1
0
mirror of https://github.com/MontFerret/ferret.git synced 2024-12-16 11:37:36 +02:00
ferret/pkg/parser/fql/fql_parser.go
2018-09-22 11:24:35 -04:00

7660 lines
197 KiB
Go

// Code generated from antlr/FqlParser.g4 by ANTLR 4.7.1. DO NOT EDIT.
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{
3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 63, 480,
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,
4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4,
50, 9, 50, 3, 2, 3, 2, 3, 3, 7, 3, 104, 10, 3, 12, 3, 14, 3, 107, 11, 3,
3, 3, 3, 3, 3, 4, 3, 4, 5, 4, 113, 10, 4, 3, 5, 3, 5, 5, 5, 117, 10, 5,
3, 6, 3, 6, 5, 6, 121, 10, 6, 3, 6, 3, 6, 3, 6, 5, 6, 126, 10, 6, 3, 6,
3, 6, 3, 6, 3, 6, 5, 6, 132, 10, 6, 3, 7, 3, 7, 3, 7, 3, 7, 5, 7, 138,
10, 7, 3, 7, 3, 7, 3, 7, 7, 7, 143, 10, 7, 12, 7, 14, 7, 146, 11, 7, 3,
7, 7, 7, 149, 10, 7, 12, 7, 14, 7, 152, 11, 7, 3, 7, 3, 7, 3, 8, 3, 8,
3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 5, 10, 165, 10, 10, 3, 11,
3, 11, 3, 11, 3, 11, 5, 11, 171, 10, 11, 3, 12, 3, 12, 3, 12, 3, 13, 3,
13, 3, 13, 3, 13, 5, 13, 180, 10, 13, 3, 14, 3, 14, 3, 14, 3, 14, 7, 14,
186, 10, 14, 12, 14, 14, 14, 189, 11, 14, 3, 15, 3, 15, 5, 15, 193, 10,
15, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16,
3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3,
16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16,
3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3,
16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 5, 16, 244, 10, 16,
3, 17, 3, 17, 3, 18, 3, 18, 3, 19, 3, 19, 3, 20, 3, 20, 3, 21, 3, 21, 3,
22, 3, 22, 3, 23, 3, 23, 3, 24, 3, 24, 5, 24, 262, 10, 24, 3, 25, 3, 25,
5, 25, 266, 10, 25, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3,
26, 3, 26, 3, 26, 3, 26, 5, 26, 279, 10, 26, 3, 27, 3, 27, 3, 28, 3, 28,
5, 28, 285, 10, 28, 3, 28, 3, 28, 3, 29, 3, 29, 3, 29, 3, 29, 7, 29, 293,
10, 29, 12, 29, 14, 29, 296, 11, 29, 5, 29, 298, 10, 29, 3, 29, 5, 29,
301, 10, 29, 3, 29, 3, 29, 3, 30, 3, 30, 3, 31, 3, 31, 3, 32, 3, 32, 3,
33, 3, 33, 3, 34, 3, 34, 3, 35, 3, 35, 6, 35, 317, 10, 35, 13, 35, 14,
35, 318, 3, 35, 7, 35, 322, 10, 35, 12, 35, 14, 35, 325, 11, 35, 3, 36,
3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 5, 36, 336, 10,
36, 3, 37, 3, 37, 3, 37, 3, 37, 7, 37, 342, 10, 37, 12, 37, 14, 37, 345,
11, 37, 6, 37, 347, 10, 37, 13, 37, 14, 37, 348, 3, 37, 3, 37, 3, 37, 3,
37, 3, 37, 7, 37, 356, 10, 37, 12, 37, 14, 37, 359, 11, 37, 7, 37, 361,
10, 37, 12, 37, 14, 37, 364, 11, 37, 3, 37, 3, 37, 3, 37, 7, 37, 369, 10,
37, 12, 37, 14, 37, 372, 11, 37, 7, 37, 374, 10, 37, 12, 37, 14, 37, 377,
11, 37, 5, 37, 379, 10, 37, 3, 38, 3, 38, 3, 39, 3, 39, 3, 39, 3, 39, 3,
40, 3, 40, 3, 41, 3, 41, 3, 41, 7, 41, 392, 10, 41, 12, 41, 14, 41, 395,
11, 41, 3, 42, 3, 42, 3, 42, 3, 43, 3, 43, 3, 43, 3, 43, 7, 43, 404, 10,
43, 12, 43, 14, 43, 407, 11, 43, 5, 43, 409, 10, 43, 3, 43, 3, 43, 3, 44,
3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3,
44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44,
3, 44, 3, 44, 3, 44, 5, 44, 438, 10, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3,
44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44,
5, 44, 455, 10, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 7, 44, 463,
10, 44, 12, 44, 14, 44, 466, 11, 44, 3, 45, 3, 45, 3, 46, 3, 46, 3, 47,
3, 47, 3, 48, 3, 48, 3, 49, 3, 49, 3, 50, 3, 50, 3, 50, 2, 3, 86, 51, 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, 2, 8, 3, 2, 47, 48, 5, 2, 39,
49, 54, 56, 59, 59, 3, 2, 18, 23, 3, 2, 31, 32, 4, 2, 24, 25, 28, 30, 4,
2, 24, 25, 57, 58, 2, 498, 2, 100, 3, 2, 2, 2, 4, 105, 3, 2, 2, 2, 6, 112,
3, 2, 2, 2, 8, 116, 3, 2, 2, 2, 10, 131, 3, 2, 2, 2, 12, 133, 3, 2, 2,
2, 14, 155, 3, 2, 2, 2, 16, 157, 3, 2, 2, 2, 18, 164, 3, 2, 2, 2, 20, 170,
3, 2, 2, 2, 22, 172, 3, 2, 2, 2, 24, 175, 3, 2, 2, 2, 26, 181, 3, 2, 2,
2, 28, 190, 3, 2, 2, 2, 30, 243, 3, 2, 2, 2, 32, 245, 3, 2, 2, 2, 34, 247,
3, 2, 2, 2, 36, 249, 3, 2, 2, 2, 38, 251, 3, 2, 2, 2, 40, 253, 3, 2, 2,
2, 42, 255, 3, 2, 2, 2, 44, 257, 3, 2, 2, 2, 46, 261, 3, 2, 2, 2, 48, 265,
3, 2, 2, 2, 50, 278, 3, 2, 2, 2, 52, 280, 3, 2, 2, 2, 54, 282, 3, 2, 2,
2, 56, 288, 3, 2, 2, 2, 58, 304, 3, 2, 2, 2, 60, 306, 3, 2, 2, 2, 62, 308,
3, 2, 2, 2, 64, 310, 3, 2, 2, 2, 66, 312, 3, 2, 2, 2, 68, 314, 3, 2, 2,
2, 70, 335, 3, 2, 2, 2, 72, 378, 3, 2, 2, 2, 74, 380, 3, 2, 2, 2, 76, 382,
3, 2, 2, 2, 78, 386, 3, 2, 2, 2, 80, 388, 3, 2, 2, 2, 82, 396, 3, 2, 2,
2, 84, 399, 3, 2, 2, 2, 86, 437, 3, 2, 2, 2, 88, 467, 3, 2, 2, 2, 90, 469,
3, 2, 2, 2, 92, 471, 3, 2, 2, 2, 94, 473, 3, 2, 2, 2, 96, 475, 3, 2, 2,
2, 98, 477, 3, 2, 2, 2, 100, 101, 5, 4, 3, 2, 101, 3, 3, 2, 2, 2, 102,
104, 5, 6, 4, 2, 103, 102, 3, 2, 2, 2, 104, 107, 3, 2, 2, 2, 105, 103,
3, 2, 2, 2, 105, 106, 3, 2, 2, 2, 106, 108, 3, 2, 2, 2, 107, 105, 3, 2,
2, 2, 108, 109, 5, 8, 5, 2, 109, 5, 3, 2, 2, 2, 110, 113, 5, 82, 42, 2,
111, 113, 5, 50, 26, 2, 112, 110, 3, 2, 2, 2, 112, 111, 3, 2, 2, 2, 113,
7, 3, 2, 2, 2, 114, 117, 5, 10, 6, 2, 115, 117, 5, 12, 7, 2, 116, 114,
3, 2, 2, 2, 116, 115, 3, 2, 2, 2, 117, 9, 3, 2, 2, 2, 118, 120, 7, 39,
2, 2, 119, 121, 7, 40, 2, 2, 120, 119, 3, 2, 2, 2, 120, 121, 3, 2, 2, 2,
121, 122, 3, 2, 2, 2, 122, 132, 5, 86, 44, 2, 123, 125, 7, 39, 2, 2, 124,
126, 7, 40, 2, 2, 125, 124, 3, 2, 2, 2, 125, 126, 3, 2, 2, 2, 126, 127,
3, 2, 2, 2, 127, 128, 7, 14, 2, 2, 128, 129, 5, 12, 7, 2, 129, 130, 7,
15, 2, 2, 130, 132, 3, 2, 2, 2, 131, 118, 3, 2, 2, 2, 131, 123, 3, 2, 2,
2, 132, 11, 3, 2, 2, 2, 133, 134, 7, 38, 2, 2, 134, 137, 5, 14, 8, 2, 135,
136, 7, 9, 2, 2, 136, 138, 5, 16, 9, 2, 137, 135, 3, 2, 2, 2, 137, 138,
3, 2, 2, 2, 138, 139, 3, 2, 2, 2, 139, 140, 7, 59, 2, 2, 140, 144, 5, 18,
10, 2, 141, 143, 5, 20, 11, 2, 142, 141, 3, 2, 2, 2, 143, 146, 3, 2, 2,
2, 144, 142, 3, 2, 2, 2, 144, 145, 3, 2, 2, 2, 145, 150, 3, 2, 2, 2, 146,
144, 3, 2, 2, 2, 147, 149, 5, 46, 24, 2, 148, 147, 3, 2, 2, 2, 149, 152,
3, 2, 2, 2, 150, 148, 3, 2, 2, 2, 150, 151, 3, 2, 2, 2, 151, 153, 3, 2,
2, 2, 152, 150, 3, 2, 2, 2, 153, 154, 5, 48, 25, 2, 154, 13, 3, 2, 2, 2,
155, 156, 7, 60, 2, 2, 156, 15, 3, 2, 2, 2, 157, 158, 7, 60, 2, 2, 158,
17, 3, 2, 2, 2, 159, 165, 5, 82, 42, 2, 160, 165, 5, 54, 28, 2, 161, 165,
5, 56, 29, 2, 162, 165, 5, 52, 27, 2, 163, 165, 5, 72, 37, 2, 164, 159,
3, 2, 2, 2, 164, 160, 3, 2, 2, 2, 164, 161, 3, 2, 2, 2, 164, 162, 3, 2,
2, 2, 164, 163, 3, 2, 2, 2, 165, 19, 3, 2, 2, 2, 166, 171, 5, 24, 13, 2,
167, 171, 5, 26, 14, 2, 168, 171, 5, 22, 12, 2, 169, 171, 5, 30, 16, 2,
170, 166, 3, 2, 2, 2, 170, 167, 3, 2, 2, 2, 170, 168, 3, 2, 2, 2, 170,
169, 3, 2, 2, 2, 171, 21, 3, 2, 2, 2, 172, 173, 7, 41, 2, 2, 173, 174,
5, 86, 44, 2, 174, 23, 3, 2, 2, 2, 175, 176, 7, 43, 2, 2, 176, 179, 7,
62, 2, 2, 177, 178, 7, 9, 2, 2, 178, 180, 7, 62, 2, 2, 179, 177, 3, 2,
2, 2, 179, 180, 3, 2, 2, 2, 180, 25, 3, 2, 2, 2, 181, 182, 7, 42, 2, 2,
182, 187, 5, 28, 15, 2, 183, 184, 7, 9, 2, 2, 184, 186, 5, 28, 15, 2, 185,
183, 3, 2, 2, 2, 186, 189, 3, 2, 2, 2, 187, 185, 3, 2, 2, 2, 187, 188,
3, 2, 2, 2, 188, 27, 3, 2, 2, 2, 189, 187, 3, 2, 2, 2, 190, 192, 5, 86,
44, 2, 191, 193, 7, 46, 2, 2, 192, 191, 3, 2, 2, 2, 192, 193, 3, 2, 2,
2, 193, 29, 3, 2, 2, 2, 194, 195, 7, 45, 2, 2, 195, 196, 5, 32, 17, 2,
196, 197, 7, 33, 2, 2, 197, 198, 5, 86, 44, 2, 198, 244, 3, 2, 2, 2, 199,
200, 7, 45, 2, 2, 200, 201, 5, 32, 17, 2, 201, 202, 7, 33, 2, 2, 202, 203,
5, 86, 44, 2, 203, 204, 7, 50, 2, 2, 204, 205, 5, 34, 18, 2, 205, 244,
3, 2, 2, 2, 206, 207, 7, 45, 2, 2, 207, 208, 5, 32, 17, 2, 208, 209, 7,
33, 2, 2, 209, 210, 5, 86, 44, 2, 210, 211, 7, 50, 2, 2, 211, 212, 5, 34,
18, 2, 212, 213, 7, 51, 2, 2, 213, 214, 5, 36, 19, 2, 214, 244, 3, 2, 2,
2, 215, 216, 7, 45, 2, 2, 216, 217, 5, 32, 17, 2, 217, 218, 7, 33, 2, 2,
218, 219, 5, 86, 44, 2, 219, 220, 7, 52, 2, 2, 220, 221, 7, 53, 2, 2, 221,
222, 5, 38, 20, 2, 222, 244, 3, 2, 2, 2, 223, 224, 7, 45, 2, 2, 224, 225,
5, 32, 17, 2, 225, 226, 7, 33, 2, 2, 226, 227, 5, 86, 44, 2, 227, 228,
7, 56, 2, 2, 228, 229, 5, 40, 21, 2, 229, 230, 7, 33, 2, 2, 230, 231, 5,
42, 22, 2, 231, 244, 3, 2, 2, 2, 232, 233, 7, 45, 2, 2, 233, 234, 7, 56,
2, 2, 234, 235, 5, 40, 21, 2, 235, 236, 7, 33, 2, 2, 236, 237, 5, 42, 22,
2, 237, 244, 3, 2, 2, 2, 238, 239, 7, 45, 2, 2, 239, 240, 7, 52, 2, 2,
240, 241, 7, 53, 2, 2, 241, 242, 7, 50, 2, 2, 242, 244, 5, 38, 20, 2, 243,
194, 3, 2, 2, 2, 243, 199, 3, 2, 2, 2, 243, 206, 3, 2, 2, 2, 243, 215,
3, 2, 2, 2, 243, 223, 3, 2, 2, 2, 243, 232, 3, 2, 2, 2, 243, 238, 3, 2,
2, 2, 244, 31, 3, 2, 2, 2, 245, 246, 7, 60, 2, 2, 246, 33, 3, 2, 2, 2,
247, 248, 7, 60, 2, 2, 248, 35, 3, 2, 2, 2, 249, 250, 7, 60, 2, 2, 250,
37, 3, 2, 2, 2, 251, 252, 7, 60, 2, 2, 252, 39, 3, 2, 2, 2, 253, 254, 7,
60, 2, 2, 254, 41, 3, 2, 2, 2, 255, 256, 5, 86, 44, 2, 256, 43, 3, 2, 2,
2, 257, 258, 3, 2, 2, 2, 258, 45, 3, 2, 2, 2, 259, 262, 5, 50, 26, 2, 260,
262, 5, 82, 42, 2, 261, 259, 3, 2, 2, 2, 261, 260, 3, 2, 2, 2, 262, 47,
3, 2, 2, 2, 263, 266, 5, 10, 6, 2, 264, 266, 5, 12, 7, 2, 265, 263, 3,
2, 2, 2, 265, 264, 3, 2, 2, 2, 266, 49, 3, 2, 2, 2, 267, 268, 7, 44, 2,
2, 268, 269, 7, 60, 2, 2, 269, 270, 7, 33, 2, 2, 270, 279, 5, 86, 44, 2,
271, 272, 7, 44, 2, 2, 272, 273, 7, 60, 2, 2, 273, 274, 7, 33, 2, 2, 274,
275, 7, 14, 2, 2, 275, 276, 5, 12, 7, 2, 276, 277, 7, 15, 2, 2, 277, 279,
3, 2, 2, 2, 278, 267, 3, 2, 2, 2, 278, 271, 3, 2, 2, 2, 279, 51, 3, 2,
2, 2, 280, 281, 7, 60, 2, 2, 281, 53, 3, 2, 2, 2, 282, 284, 7, 12, 2, 2,
283, 285, 5, 68, 35, 2, 284, 283, 3, 2, 2, 2, 284, 285, 3, 2, 2, 2, 285,
286, 3, 2, 2, 2, 286, 287, 7, 13, 2, 2, 287, 55, 3, 2, 2, 2, 288, 297,
7, 16, 2, 2, 289, 294, 5, 70, 36, 2, 290, 291, 7, 9, 2, 2, 291, 293, 5,
70, 36, 2, 292, 290, 3, 2, 2, 2, 293, 296, 3, 2, 2, 2, 294, 292, 3, 2,
2, 2, 294, 295, 3, 2, 2, 2, 295, 298, 3, 2, 2, 2, 296, 294, 3, 2, 2, 2,
297, 289, 3, 2, 2, 2, 297, 298, 3, 2, 2, 2, 298, 300, 3, 2, 2, 2, 299,
301, 7, 9, 2, 2, 300, 299, 3, 2, 2, 2, 300, 301, 3, 2, 2, 2, 301, 302,
3, 2, 2, 2, 302, 303, 7, 17, 2, 2, 303, 57, 3, 2, 2, 2, 304, 305, 7, 49,
2, 2, 305, 59, 3, 2, 2, 2, 306, 307, 7, 61, 2, 2, 307, 61, 3, 2, 2, 2,
308, 309, 7, 62, 2, 2, 309, 63, 3, 2, 2, 2, 310, 311, 7, 63, 2, 2, 311,
65, 3, 2, 2, 2, 312, 313, 9, 2, 2, 2, 313, 67, 3, 2, 2, 2, 314, 323, 5,
86, 44, 2, 315, 317, 7, 9, 2, 2, 316, 315, 3, 2, 2, 2, 317, 318, 3, 2,
2, 2, 318, 316, 3, 2, 2, 2, 318, 319, 3, 2, 2, 2, 319, 320, 3, 2, 2, 2,
320, 322, 5, 86, 44, 2, 321, 316, 3, 2, 2, 2, 322, 325, 3, 2, 2, 2, 323,
321, 3, 2, 2, 2, 323, 324, 3, 2, 2, 2, 324, 69, 3, 2, 2, 2, 325, 323, 3,
2, 2, 2, 326, 327, 5, 78, 40, 2, 327, 328, 7, 7, 2, 2, 328, 329, 5, 86,
44, 2, 329, 336, 3, 2, 2, 2, 330, 331, 5, 76, 39, 2, 331, 332, 7, 7, 2,
2, 332, 333, 5, 86, 44, 2, 333, 336, 3, 2, 2, 2, 334, 336, 5, 74, 38, 2,
335, 326, 3, 2, 2, 2, 335, 330, 3, 2, 2, 2, 335, 334, 3, 2, 2, 2, 336,
71, 3, 2, 2, 2, 337, 346, 7, 60, 2, 2, 338, 339, 7, 10, 2, 2, 339, 343,
5, 78, 40, 2, 340, 342, 5, 76, 39, 2, 341, 340, 3, 2, 2, 2, 342, 345, 3,
2, 2, 2, 343, 341, 3, 2, 2, 2, 343, 344, 3, 2, 2, 2, 344, 347, 3, 2, 2,
2, 345, 343, 3, 2, 2, 2, 346, 338, 3, 2, 2, 2, 347, 348, 3, 2, 2, 2, 348,
346, 3, 2, 2, 2, 348, 349, 3, 2, 2, 2, 349, 379, 3, 2, 2, 2, 350, 351,
7, 60, 2, 2, 351, 362, 5, 76, 39, 2, 352, 353, 7, 10, 2, 2, 353, 357, 5,
78, 40, 2, 354, 356, 5, 76, 39, 2, 355, 354, 3, 2, 2, 2, 356, 359, 3, 2,
2, 2, 357, 355, 3, 2, 2, 2, 357, 358, 3, 2, 2, 2, 358, 361, 3, 2, 2, 2,
359, 357, 3, 2, 2, 2, 360, 352, 3, 2, 2, 2, 361, 364, 3, 2, 2, 2, 362,
360, 3, 2, 2, 2, 362, 363, 3, 2, 2, 2, 363, 375, 3, 2, 2, 2, 364, 362,
3, 2, 2, 2, 365, 370, 5, 76, 39, 2, 366, 367, 7, 10, 2, 2, 367, 369, 5,
78, 40, 2, 368, 366, 3, 2, 2, 2, 369, 372, 3, 2, 2, 2, 370, 368, 3, 2,
2, 2, 370, 371, 3, 2, 2, 2, 371, 374, 3, 2, 2, 2, 372, 370, 3, 2, 2, 2,
373, 365, 3, 2, 2, 2, 374, 377, 3, 2, 2, 2, 375, 373, 3, 2, 2, 2, 375,
376, 3, 2, 2, 2, 376, 379, 3, 2, 2, 2, 377, 375, 3, 2, 2, 2, 378, 337,
3, 2, 2, 2, 378, 350, 3, 2, 2, 2, 379, 73, 3, 2, 2, 2, 380, 381, 5, 52,
27, 2, 381, 75, 3, 2, 2, 2, 382, 383, 7, 12, 2, 2, 383, 384, 5, 86, 44,
2, 384, 385, 7, 13, 2, 2, 385, 77, 3, 2, 2, 2, 386, 387, 7, 60, 2, 2, 387,
79, 3, 2, 2, 2, 388, 393, 5, 86, 44, 2, 389, 390, 7, 9, 2, 2, 390, 392,
5, 86, 44, 2, 391, 389, 3, 2, 2, 2, 392, 395, 3, 2, 2, 2, 393, 391, 3,
2, 2, 2, 393, 394, 3, 2, 2, 2, 394, 81, 3, 2, 2, 2, 395, 393, 3, 2, 2,
2, 396, 397, 7, 60, 2, 2, 397, 398, 5, 84, 43, 2, 398, 83, 3, 2, 2, 2,
399, 408, 7, 14, 2, 2, 400, 405, 5, 86, 44, 2, 401, 402, 7, 9, 2, 2, 402,
404, 5, 86, 44, 2, 403, 401, 3, 2, 2, 2, 404, 407, 3, 2, 2, 2, 405, 403,
3, 2, 2, 2, 405, 406, 3, 2, 2, 2, 406, 409, 3, 2, 2, 2, 407, 405, 3, 2,
2, 2, 408, 400, 3, 2, 2, 2, 408, 409, 3, 2, 2, 2, 409, 410, 3, 2, 2, 2,
410, 411, 7, 15, 2, 2, 411, 85, 3, 2, 2, 2, 412, 413, 8, 44, 1, 2, 413,
438, 5, 82, 42, 2, 414, 415, 7, 14, 2, 2, 415, 416, 5, 80, 41, 2, 416,
417, 7, 15, 2, 2, 417, 438, 3, 2, 2, 2, 418, 419, 7, 27, 2, 2, 419, 438,
5, 86, 44, 17, 420, 421, 7, 26, 2, 2, 421, 438, 5, 86, 44, 16, 422, 423,
7, 24, 2, 2, 423, 438, 5, 86, 44, 15, 424, 425, 7, 25, 2, 2, 425, 438,
5, 86, 44, 14, 426, 427, 7, 58, 2, 2, 427, 438, 5, 86, 44, 13, 428, 438,
5, 60, 31, 2, 429, 438, 5, 62, 32, 2, 430, 438, 5, 64, 33, 2, 431, 438,
5, 58, 30, 2, 432, 438, 5, 54, 28, 2, 433, 438, 5, 56, 29, 2, 434, 438,
5, 52, 27, 2, 435, 438, 5, 72, 37, 2, 436, 438, 5, 66, 34, 2, 437, 412,
3, 2, 2, 2, 437, 414, 3, 2, 2, 2, 437, 418, 3, 2, 2, 2, 437, 420, 3, 2,
2, 2, 437, 422, 3, 2, 2, 2, 437, 424, 3, 2, 2, 2, 437, 426, 3, 2, 2, 2,
437, 428, 3, 2, 2, 2, 437, 429, 3, 2, 2, 2, 437, 430, 3, 2, 2, 2, 437,
431, 3, 2, 2, 2, 437, 432, 3, 2, 2, 2, 437, 433, 3, 2, 2, 2, 437, 434,
3, 2, 2, 2, 437, 435, 3, 2, 2, 2, 437, 436, 3, 2, 2, 2, 438, 464, 3, 2,
2, 2, 439, 440, 12, 24, 2, 2, 440, 441, 5, 92, 47, 2, 441, 442, 5, 86,
44, 25, 442, 463, 3, 2, 2, 2, 443, 444, 12, 23, 2, 2, 444, 445, 5, 94,
48, 2, 445, 446, 5, 86, 44, 24, 446, 463, 3, 2, 2, 2, 447, 448, 12, 22,
2, 2, 448, 449, 5, 96, 49, 2, 449, 450, 5, 86, 44, 23, 450, 463, 3, 2,
2, 2, 451, 452, 12, 12, 2, 2, 452, 454, 7, 35, 2, 2, 453, 455, 5, 86, 44,
2, 454, 453, 3, 2, 2, 2, 454, 455, 3, 2, 2, 2, 455, 456, 3, 2, 2, 2, 456,
457, 7, 7, 2, 2, 457, 463, 5, 86, 44, 13, 458, 459, 12, 19, 2, 2, 459,
463, 7, 27, 2, 2, 460, 461, 12, 18, 2, 2, 461, 463, 7, 26, 2, 2, 462, 439,
3, 2, 2, 2, 462, 443, 3, 2, 2, 2, 462, 447, 3, 2, 2, 2, 462, 451, 3, 2,
2, 2, 462, 458, 3, 2, 2, 2, 462, 460, 3, 2, 2, 2, 463, 466, 3, 2, 2, 2,
464, 462, 3, 2, 2, 2, 464, 465, 3, 2, 2, 2, 465, 87, 3, 2, 2, 2, 466, 464,
3, 2, 2, 2, 467, 468, 5, 90, 46, 2, 468, 89, 3, 2, 2, 2, 469, 470, 9, 3,
2, 2, 470, 91, 3, 2, 2, 2, 471, 472, 9, 4, 2, 2, 472, 93, 3, 2, 2, 2, 473,
474, 9, 5, 2, 2, 474, 95, 3, 2, 2, 2, 475, 476, 9, 6, 2, 2, 476, 97, 3,
2, 2, 2, 477, 478, 9, 7, 2, 2, 478, 99, 3, 2, 2, 2, 41, 105, 112, 116,
120, 125, 131, 137, 144, 150, 164, 170, 179, 187, 192, 243, 261, 265, 278,
284, 294, 297, 300, 318, 323, 335, 343, 348, 357, 362, 370, 375, 378, 393,
405, 408, 437, 454, 462, 464,
}
var deserializer = antlr.NewATNDeserializer(nil)
var deserializedATN = deserializer.DeserializeFromUInt16(parserATN)
var literalNames = []string{
"", "", "", "", "", "':'", "';'", "','", "'.'", "'...'", "'['", "']'",
"'('", "')'", "'{'", "'}'", "'>'", "'<'", "'=='", "'>='", "'<='", "'!='",
"'+'", "'-'", "'--'", "'++'", "'*'", "'/'", "'%'", "", "", "'='", "'..'",
"'?'", "'!~'", "'=~'", "'FOR'", "'RETURN'", "'DISTINCT'", "'FILTER'", "'SORT'",
"'LIMIT'", "'LET'", "'COLLECT'", "", "'NONE'", "'NULL'", "", "'INTO'",
"'KEEP'", "'WITH'", "'COUNT'", "'ALL'", "'ANY'", "'AGGREGATE'", "'LIKE'",
"", "'IN'",
}
var symbolicNames = []string{
"", "MultiLineComment", "SingleLineComment", "WhiteSpaces", "LineTerminator",
"Colon", "SemiColon", "Comma", "Dot", "Ellipsis", "OpenBracket", "CloseBracket",
"OpenParen", "CloseParen", "OpenBrace", "CloseBrace", "Gt", "Lt", "Eq",
"Gte", "Lte", "Neq", "Plus", "Minus", "MinusMinus", "PlusPlus", "Multi",
"Div", "Mod", "And", "Or", "Assign", "Range", "QuestionMark", "RegexNotMatch",
"RegexMatch", "For", "Return", "Distinct", "Filter", "Sort", "Limit", "Let",
"Collect", "SortDirection", "None", "Null", "BooleanLiteral", "Into", "Keep",
"With", "Count", "All", "Any", "Aggregate", "Like", "Not", "In", "Identifier",
"StringLiteral", "IntegerLiteral", "FloatLiteral",
}
var ruleNames = []string{
"program", "body", "bodyStatement", "bodyExpression", "returnExpression",
"forExpression", "forExpressionValueVariable", "forExpressionKeyVariable",
"forExpressionSource", "forExpressionClause", "filterClause", "limitClause",
"sortClause", "sortClauseExpression", "collectClause", "collectVariable",
"collectGroupVariable", "collectKeepVariable", "collectCountVariable",
"collectAggregateVariable", "collectAggregateExpression", "collectOption",
"forExpressionBody", "forExpressionReturn", "variableDeclaration", "variable",
"arrayLiteral", "objectLiteral", "booleanLiteral", "stringLiteral", "integerLiteral",
"floatLiteral", "noneLiteral", "arrayElementList", "propertyAssignment",
"memberExpression", "shorthandPropertyName", "computedPropertyName", "propertyName",
"expressionSequence", "functionCallExpression", "arguments", "expression",
"reservedWord", "keyword", "equalityOperator", "logicalOperator", "mathOperator",
"unaryOperator",
}
var decisionToDFA = make([]*antlr.DFA, len(deserializedATN.DecisionToState))
func init() {
for index, ds := range deserializedATN.DecisionToState {
decisionToDFA[index] = antlr.NewDFA(ds, index)
}
}
type FqlParser struct {
*antlr.BaseParser
}
func NewFqlParser(input antlr.TokenStream) *FqlParser {
this := new(FqlParser)
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 (
FqlParserEOF = antlr.TokenEOF
FqlParserMultiLineComment = 1
FqlParserSingleLineComment = 2
FqlParserWhiteSpaces = 3
FqlParserLineTerminator = 4
FqlParserColon = 5
FqlParserSemiColon = 6
FqlParserComma = 7
FqlParserDot = 8
FqlParserEllipsis = 9
FqlParserOpenBracket = 10
FqlParserCloseBracket = 11
FqlParserOpenParen = 12
FqlParserCloseParen = 13
FqlParserOpenBrace = 14
FqlParserCloseBrace = 15
FqlParserGt = 16
FqlParserLt = 17
FqlParserEq = 18
FqlParserGte = 19
FqlParserLte = 20
FqlParserNeq = 21
FqlParserPlus = 22
FqlParserMinus = 23
FqlParserMinusMinus = 24
FqlParserPlusPlus = 25
FqlParserMulti = 26
FqlParserDiv = 27
FqlParserMod = 28
FqlParserAnd = 29
FqlParserOr = 30
FqlParserAssign = 31
FqlParserRange = 32
FqlParserQuestionMark = 33
FqlParserRegexNotMatch = 34
FqlParserRegexMatch = 35
FqlParserFor = 36
FqlParserReturn = 37
FqlParserDistinct = 38
FqlParserFilter = 39
FqlParserSort = 40
FqlParserLimit = 41
FqlParserLet = 42
FqlParserCollect = 43
FqlParserSortDirection = 44
FqlParserNone = 45
FqlParserNull = 46
FqlParserBooleanLiteral = 47
FqlParserInto = 48
FqlParserKeep = 49
FqlParserWith = 50
FqlParserCount = 51
FqlParserAll = 52
FqlParserAny = 53
FqlParserAggregate = 54
FqlParserLike = 55
FqlParserNot = 56
FqlParserIn = 57
FqlParserIdentifier = 58
FqlParserStringLiteral = 59
FqlParserIntegerLiteral = 60
FqlParserFloatLiteral = 61
)
// FqlParser rules.
const (
FqlParserRULE_program = 0
FqlParserRULE_body = 1
FqlParserRULE_bodyStatement = 2
FqlParserRULE_bodyExpression = 3
FqlParserRULE_returnExpression = 4
FqlParserRULE_forExpression = 5
FqlParserRULE_forExpressionValueVariable = 6
FqlParserRULE_forExpressionKeyVariable = 7
FqlParserRULE_forExpressionSource = 8
FqlParserRULE_forExpressionClause = 9
FqlParserRULE_filterClause = 10
FqlParserRULE_limitClause = 11
FqlParserRULE_sortClause = 12
FqlParserRULE_sortClauseExpression = 13
FqlParserRULE_collectClause = 14
FqlParserRULE_collectVariable = 15
FqlParserRULE_collectGroupVariable = 16
FqlParserRULE_collectKeepVariable = 17
FqlParserRULE_collectCountVariable = 18
FqlParserRULE_collectAggregateVariable = 19
FqlParserRULE_collectAggregateExpression = 20
FqlParserRULE_collectOption = 21
FqlParserRULE_forExpressionBody = 22
FqlParserRULE_forExpressionReturn = 23
FqlParserRULE_variableDeclaration = 24
FqlParserRULE_variable = 25
FqlParserRULE_arrayLiteral = 26
FqlParserRULE_objectLiteral = 27
FqlParserRULE_booleanLiteral = 28
FqlParserRULE_stringLiteral = 29
FqlParserRULE_integerLiteral = 30
FqlParserRULE_floatLiteral = 31
FqlParserRULE_noneLiteral = 32
FqlParserRULE_arrayElementList = 33
FqlParserRULE_propertyAssignment = 34
FqlParserRULE_memberExpression = 35
FqlParserRULE_shorthandPropertyName = 36
FqlParserRULE_computedPropertyName = 37
FqlParserRULE_propertyName = 38
FqlParserRULE_expressionSequence = 39
FqlParserRULE_functionCallExpression = 40
FqlParserRULE_arguments = 41
FqlParserRULE_expression = 42
FqlParserRULE_reservedWord = 43
FqlParserRULE_keyword = 44
FqlParserRULE_equalityOperator = 45
FqlParserRULE_logicalOperator = 46
FqlParserRULE_mathOperator = 47
FqlParserRULE_unaryOperator = 48
)
// 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)
}
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)
}
}
}()
p.EnterOuterAlt(localctx, 1)
{
p.SetState(98)
p.Body()
}
return localctx
}
// 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())
p.EnterRule(localctx, 2, FqlParserRULE_body)
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)
p.SetState(103)
p.GetErrorHandler().Sync(p)
_la = p.GetTokenStream().LA(1)
for _la == FqlParserLet || _la == FqlParserIdentifier {
{
p.SetState(100)
p.BodyStatement()
}
p.SetState(105)
p.GetErrorHandler().Sync(p)
_la = p.GetTokenStream().LA(1)
}
{
p.SetState(106)
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 }
func (s *BodyStatementContext) FunctionCallExpression() IFunctionCallExpressionContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IFunctionCallExpressionContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(IFunctionCallExpressionContext)
}
func (s *BodyStatementContext) VariableDeclaration() IVariableDeclarationContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IVariableDeclarationContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(IVariableDeclarationContext)
}
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())
p.EnterRule(localctx, 4, FqlParserRULE_bodyStatement)
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(110)
p.GetErrorHandler().Sync(p)
switch p.GetTokenStream().LA(1) {
case FqlParserIdentifier:
p.EnterOuterAlt(localctx, 1)
{
p.SetState(108)
p.FunctionCallExpression()
}
case FqlParserLet:
p.EnterOuterAlt(localctx, 2)
{
p.SetState(109)
p.VariableDeclaration()
}
default:
panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
}
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())
p.EnterRule(localctx, 6, FqlParserRULE_bodyExpression)
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(114)
p.GetErrorHandler().Sync(p)
switch p.GetTokenStream().LA(1) {
case FqlParserReturn:
p.EnterOuterAlt(localctx, 1)
{
p.SetState(112)
p.ReturnExpression()
}
case FqlParserFor:
p.EnterOuterAlt(localctx, 2)
{
p.SetState(113)
p.ForExpression()
}
default:
panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
}
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) Expression() IExpressionContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IExpressionContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(IExpressionContext)
}
func (s *ReturnExpressionContext) Distinct() antlr.TerminalNode {
return s.GetToken(FqlParserDistinct, 0)
}
func (s *ReturnExpressionContext) OpenParen() antlr.TerminalNode {
return s.GetToken(FqlParserOpenParen, 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) CloseParen() antlr.TerminalNode {
return s.GetToken(FqlParserCloseParen, 0)
}
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, 8, 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(129)
p.GetErrorHandler().Sync(p)
switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 5, p.GetParserRuleContext()) {
case 1:
p.EnterOuterAlt(localctx, 1)
{
p.SetState(116)
p.Match(FqlParserReturn)
}
p.SetState(118)
p.GetErrorHandler().Sync(p)
_la = p.GetTokenStream().LA(1)
if _la == FqlParserDistinct {
{
p.SetState(117)
p.Match(FqlParserDistinct)
}
}
{
p.SetState(120)
p.expression(0)
}
case 2:
p.EnterOuterAlt(localctx, 2)
{
p.SetState(121)
p.Match(FqlParserReturn)
}
p.SetState(123)
p.GetErrorHandler().Sync(p)
_la = p.GetTokenStream().LA(1)
if _la == FqlParserDistinct {
{
p.SetState(122)
p.Match(FqlParserDistinct)
}
}
{
p.SetState(125)
p.Match(FqlParserOpenParen)
}
{
p.SetState(126)
p.ForExpression()
}
{
p.SetState(127)
p.Match(FqlParserCloseParen)
}
}
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)
}
func (s *ForExpressionContext) ForExpressionValueVariable() IForExpressionValueVariableContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IForExpressionValueVariableContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(IForExpressionValueVariableContext)
}
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) ForExpressionKeyVariable() IForExpressionKeyVariableContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IForExpressionKeyVariableContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(IForExpressionKeyVariableContext)
}
func (s *ForExpressionContext) AllForExpressionClause() []IForExpressionClauseContext {
var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IForExpressionClauseContext)(nil)).Elem())
var tst = make([]IForExpressionClauseContext, len(ts))
for i, t := range ts {
if t != nil {
tst[i] = t.(IForExpressionClauseContext)
}
}
return tst
}
func (s *ForExpressionContext) ForExpressionClause(i int) IForExpressionClauseContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IForExpressionClauseContext)(nil)).Elem(), i)
if t == nil {
return nil
}
return t.(IForExpressionClauseContext)
}
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)
}
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())
p.EnterRule(localctx, 10, FqlParserRULE_forExpression)
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)
{
p.SetState(131)
p.Match(FqlParserFor)
}
{
p.SetState(132)
p.ForExpressionValueVariable()
}
p.SetState(135)
p.GetErrorHandler().Sync(p)
_la = p.GetTokenStream().LA(1)
if _la == FqlParserComma {
{
p.SetState(133)
p.Match(FqlParserComma)
}
{
p.SetState(134)
p.ForExpressionKeyVariable()
}
}
{
p.SetState(137)
p.Match(FqlParserIn)
}
{
p.SetState(138)
p.ForExpressionSource()
}
p.SetState(142)
p.GetErrorHandler().Sync(p)
_la = p.GetTokenStream().LA(1)
for ((_la-39)&-(0x1f+1)) == 0 && ((1<<uint((_la-39)))&((1<<(FqlParserFilter-39))|(1<<(FqlParserSort-39))|(1<<(FqlParserLimit-39))|(1<<(FqlParserCollect-39)))) != 0 {
{
p.SetState(139)
p.ForExpressionClause()
}
p.SetState(144)
p.GetErrorHandler().Sync(p)
_la = p.GetTokenStream().LA(1)
}
p.SetState(148)
p.GetErrorHandler().Sync(p)
_la = p.GetTokenStream().LA(1)
for _la == FqlParserLet || _la == FqlParserIdentifier {
{
p.SetState(145)
p.ForExpressionBody()
}
p.SetState(150)
p.GetErrorHandler().Sync(p)
_la = p.GetTokenStream().LA(1)
}
{
p.SetState(151)
p.ForExpressionReturn()
}
return localctx
}
// IForExpressionValueVariableContext is an interface to support dynamic dispatch.
type IForExpressionValueVariableContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsForExpressionValueVariableContext differentiates from other interfaces.
IsForExpressionValueVariableContext()
}
type ForExpressionValueVariableContext struct {
*antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyForExpressionValueVariableContext() *ForExpressionValueVariableContext {
var p = new(ForExpressionValueVariableContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
p.RuleIndex = FqlParserRULE_forExpressionValueVariable
return p
}
func (*ForExpressionValueVariableContext) IsForExpressionValueVariableContext() {}
func NewForExpressionValueVariableContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ForExpressionValueVariableContext {
var p = new(ForExpressionValueVariableContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
p.parser = parser
p.RuleIndex = FqlParserRULE_forExpressionValueVariable
return p
}
func (s *ForExpressionValueVariableContext) GetParser() antlr.Parser { return s.parser }
func (s *ForExpressionValueVariableContext) Identifier() antlr.TerminalNode {
return s.GetToken(FqlParserIdentifier, 0)
}
func (s *ForExpressionValueVariableContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *ForExpressionValueVariableContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *ForExpressionValueVariableContext) EnterRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.EnterForExpressionValueVariable(s)
}
}
func (s *ForExpressionValueVariableContext) ExitRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.ExitForExpressionValueVariable(s)
}
}
func (s *ForExpressionValueVariableContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case FqlParserVisitor:
return t.VisitForExpressionValueVariable(s)
default:
return t.VisitChildren(s)
}
}
func (p *FqlParser) ForExpressionValueVariable() (localctx IForExpressionValueVariableContext) {
localctx = NewForExpressionValueVariableContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 12, FqlParserRULE_forExpressionValueVariable)
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(153)
p.Match(FqlParserIdentifier)
}
return localctx
}
// IForExpressionKeyVariableContext is an interface to support dynamic dispatch.
type IForExpressionKeyVariableContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsForExpressionKeyVariableContext differentiates from other interfaces.
IsForExpressionKeyVariableContext()
}
type ForExpressionKeyVariableContext struct {
*antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyForExpressionKeyVariableContext() *ForExpressionKeyVariableContext {
var p = new(ForExpressionKeyVariableContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
p.RuleIndex = FqlParserRULE_forExpressionKeyVariable
return p
}
func (*ForExpressionKeyVariableContext) IsForExpressionKeyVariableContext() {}
func NewForExpressionKeyVariableContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ForExpressionKeyVariableContext {
var p = new(ForExpressionKeyVariableContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
p.parser = parser
p.RuleIndex = FqlParserRULE_forExpressionKeyVariable
return p
}
func (s *ForExpressionKeyVariableContext) GetParser() antlr.Parser { return s.parser }
func (s *ForExpressionKeyVariableContext) Identifier() antlr.TerminalNode {
return s.GetToken(FqlParserIdentifier, 0)
}
func (s *ForExpressionKeyVariableContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *ForExpressionKeyVariableContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *ForExpressionKeyVariableContext) EnterRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.EnterForExpressionKeyVariable(s)
}
}
func (s *ForExpressionKeyVariableContext) ExitRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.ExitForExpressionKeyVariable(s)
}
}
func (s *ForExpressionKeyVariableContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case FqlParserVisitor:
return t.VisitForExpressionKeyVariable(s)
default:
return t.VisitChildren(s)
}
}
func (p *FqlParser) ForExpressionKeyVariable() (localctx IForExpressionKeyVariableContext) {
localctx = NewForExpressionKeyVariableContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 14, FqlParserRULE_forExpressionKeyVariable)
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(155)
p.Match(FqlParserIdentifier)
}
return localctx
}
// IForExpressionSourceContext is an interface to support dynamic dispatch.
type IForExpressionSourceContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsForExpressionSourceContext differentiates from other interfaces.
IsForExpressionSourceContext()
}
type ForExpressionSourceContext struct {
*antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyForExpressionSourceContext() *ForExpressionSourceContext {
var p = new(ForExpressionSourceContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
p.RuleIndex = FqlParserRULE_forExpressionSource
return p
}
func (*ForExpressionSourceContext) IsForExpressionSourceContext() {}
func NewForExpressionSourceContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ForExpressionSourceContext {
var p = new(ForExpressionSourceContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
p.parser = parser
p.RuleIndex = FqlParserRULE_forExpressionSource
return p
}
func (s *ForExpressionSourceContext) GetParser() antlr.Parser { return s.parser }
func (s *ForExpressionSourceContext) FunctionCallExpression() IFunctionCallExpressionContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IFunctionCallExpressionContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(IFunctionCallExpressionContext)
}
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)
}
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())
p.EnterRule(localctx, 16, FqlParserRULE_forExpressionSource)
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(162)
p.GetErrorHandler().Sync(p)
switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 9, p.GetParserRuleContext()) {
case 1:
p.EnterOuterAlt(localctx, 1)
{
p.SetState(157)
p.FunctionCallExpression()
}
case 2:
p.EnterOuterAlt(localctx, 2)
{
p.SetState(158)
p.ArrayLiteral()
}
case 3:
p.EnterOuterAlt(localctx, 3)
{
p.SetState(159)
p.ObjectLiteral()
}
case 4:
p.EnterOuterAlt(localctx, 4)
{
p.SetState(160)
p.Variable()
}
case 5:
p.EnterOuterAlt(localctx, 5)
{
p.SetState(161)
p.MemberExpression()
}
}
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())
p.EnterRule(localctx, 18, FqlParserRULE_forExpressionClause)
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(168)
p.GetErrorHandler().Sync(p)
switch p.GetTokenStream().LA(1) {
case FqlParserLimit:
p.EnterOuterAlt(localctx, 1)
{
p.SetState(164)
p.LimitClause()
}
case FqlParserSort:
p.EnterOuterAlt(localctx, 2)
{
p.SetState(165)
p.SortClause()
}
case FqlParserFilter:
p.EnterOuterAlt(localctx, 3)
{
p.SetState(166)
p.FilterClause()
}
case FqlParserCollect:
p.EnterOuterAlt(localctx, 4)
{
p.SetState(167)
p.CollectClause()
}
default:
panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
}
return localctx
}
// IFilterClauseContext is an interface to support dynamic dispatch.
type IFilterClauseContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsFilterClauseContext differentiates from other interfaces.
IsFilterClauseContext()
}
type FilterClauseContext struct {
*antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyFilterClauseContext() *FilterClauseContext {
var p = new(FilterClauseContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
p.RuleIndex = FqlParserRULE_filterClause
return p
}
func (*FilterClauseContext) IsFilterClauseContext() {}
func NewFilterClauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *FilterClauseContext {
var p = new(FilterClauseContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
p.parser = parser
p.RuleIndex = FqlParserRULE_filterClause
return p
}
func (s *FilterClauseContext) GetParser() antlr.Parser { return s.parser }
func (s *FilterClauseContext) Filter() antlr.TerminalNode {
return s.GetToken(FqlParserFilter, 0)
}
func (s *FilterClauseContext) Expression() IExpressionContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IExpressionContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(IExpressionContext)
}
func (s *FilterClauseContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *FilterClauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *FilterClauseContext) EnterRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.EnterFilterClause(s)
}
}
func (s *FilterClauseContext) ExitRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.ExitFilterClause(s)
}
}
func (s *FilterClauseContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case FqlParserVisitor:
return t.VisitFilterClause(s)
default:
return t.VisitChildren(s)
}
}
func (p *FqlParser) FilterClause() (localctx IFilterClauseContext) {
localctx = NewFilterClauseContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 20, FqlParserRULE_filterClause)
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(170)
p.Match(FqlParserFilter)
}
{
p.SetState(171)
p.expression(0)
}
return localctx
}
// ILimitClauseContext is an interface to support dynamic dispatch.
type ILimitClauseContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsLimitClauseContext differentiates from other interfaces.
IsLimitClauseContext()
}
type LimitClauseContext struct {
*antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyLimitClauseContext() *LimitClauseContext {
var p = new(LimitClauseContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
p.RuleIndex = FqlParserRULE_limitClause
return p
}
func (*LimitClauseContext) IsLimitClauseContext() {}
func NewLimitClauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *LimitClauseContext {
var p = new(LimitClauseContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
p.parser = parser
p.RuleIndex = FqlParserRULE_limitClause
return p
}
func (s *LimitClauseContext) GetParser() antlr.Parser { return s.parser }
func (s *LimitClauseContext) Limit() antlr.TerminalNode {
return s.GetToken(FqlParserLimit, 0)
}
func (s *LimitClauseContext) AllIntegerLiteral() []antlr.TerminalNode {
return s.GetTokens(FqlParserIntegerLiteral)
}
func (s *LimitClauseContext) IntegerLiteral(i int) antlr.TerminalNode {
return s.GetToken(FqlParserIntegerLiteral, i)
}
func (s *LimitClauseContext) Comma() antlr.TerminalNode {
return s.GetToken(FqlParserComma, 0)
}
func (s *LimitClauseContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *LimitClauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *LimitClauseContext) EnterRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.EnterLimitClause(s)
}
}
func (s *LimitClauseContext) ExitRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.ExitLimitClause(s)
}
}
func (s *LimitClauseContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case FqlParserVisitor:
return t.VisitLimitClause(s)
default:
return t.VisitChildren(s)
}
}
func (p *FqlParser) LimitClause() (localctx ILimitClauseContext) {
localctx = NewLimitClauseContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 22, FqlParserRULE_limitClause)
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)
{
p.SetState(173)
p.Match(FqlParserLimit)
}
{
p.SetState(174)
p.Match(FqlParserIntegerLiteral)
}
p.SetState(177)
p.GetErrorHandler().Sync(p)
_la = p.GetTokenStream().LA(1)
if _la == FqlParserComma {
{
p.SetState(175)
p.Match(FqlParserComma)
}
{
p.SetState(176)
p.Match(FqlParserIntegerLiteral)
}
}
return localctx
}
// ISortClauseContext is an interface to support dynamic dispatch.
type ISortClauseContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsSortClauseContext differentiates from other interfaces.
IsSortClauseContext()
}
type SortClauseContext struct {
*antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptySortClauseContext() *SortClauseContext {
var p = new(SortClauseContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
p.RuleIndex = FqlParserRULE_sortClause
return p
}
func (*SortClauseContext) IsSortClauseContext() {}
func NewSortClauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *SortClauseContext {
var p = new(SortClauseContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
p.parser = parser
p.RuleIndex = FqlParserRULE_sortClause
return p
}
func (s *SortClauseContext) GetParser() antlr.Parser { return s.parser }
func (s *SortClauseContext) Sort() antlr.TerminalNode {
return s.GetToken(FqlParserSort, 0)
}
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
}
func (s *SortClauseContext) SortClauseExpression(i int) ISortClauseExpressionContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*ISortClauseExpressionContext)(nil)).Elem(), i)
if t == nil {
return nil
}
return t.(ISortClauseExpressionContext)
}
func (s *SortClauseContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *SortClauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *SortClauseContext) EnterRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.EnterSortClause(s)
}
}
func (s *SortClauseContext) ExitRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.ExitSortClause(s)
}
}
func (s *SortClauseContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case FqlParserVisitor:
return t.VisitSortClause(s)
default:
return t.VisitChildren(s)
}
}
func (p *FqlParser) SortClause() (localctx ISortClauseContext) {
localctx = NewSortClauseContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 24, FqlParserRULE_sortClause)
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)
{
p.SetState(179)
p.Match(FqlParserSort)
}
{
p.SetState(180)
p.SortClauseExpression()
}
p.SetState(185)
p.GetErrorHandler().Sync(p)
_la = p.GetTokenStream().LA(1)
for _la == FqlParserComma {
{
p.SetState(181)
p.Match(FqlParserComma)
}
{
p.SetState(182)
p.SortClauseExpression()
}
p.SetState(187)
p.GetErrorHandler().Sync(p)
_la = p.GetTokenStream().LA(1)
}
return localctx
}
// ISortClauseExpressionContext is an interface to support dynamic dispatch.
type ISortClauseExpressionContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsSortClauseExpressionContext differentiates from other interfaces.
IsSortClauseExpressionContext()
}
type SortClauseExpressionContext struct {
*antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptySortClauseExpressionContext() *SortClauseExpressionContext {
var p = new(SortClauseExpressionContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
p.RuleIndex = FqlParserRULE_sortClauseExpression
return p
}
func (*SortClauseExpressionContext) IsSortClauseExpressionContext() {}
func NewSortClauseExpressionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *SortClauseExpressionContext {
var p = new(SortClauseExpressionContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
p.parser = parser
p.RuleIndex = FqlParserRULE_sortClauseExpression
return p
}
func (s *SortClauseExpressionContext) GetParser() antlr.Parser { return s.parser }
func (s *SortClauseExpressionContext) Expression() IExpressionContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IExpressionContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(IExpressionContext)
}
func (s *SortClauseExpressionContext) SortDirection() antlr.TerminalNode {
return s.GetToken(FqlParserSortDirection, 0)
}
func (s *SortClauseExpressionContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *SortClauseExpressionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *SortClauseExpressionContext) EnterRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.EnterSortClauseExpression(s)
}
}
func (s *SortClauseExpressionContext) ExitRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.ExitSortClauseExpression(s)
}
}
func (s *SortClauseExpressionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case FqlParserVisitor:
return t.VisitSortClauseExpression(s)
default:
return t.VisitChildren(s)
}
}
func (p *FqlParser) SortClauseExpression() (localctx ISortClauseExpressionContext) {
localctx = NewSortClauseExpressionContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 26, FqlParserRULE_sortClauseExpression)
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)
{
p.SetState(188)
p.expression(0)
}
p.SetState(190)
p.GetErrorHandler().Sync(p)
_la = p.GetTokenStream().LA(1)
if _la == FqlParserSortDirection {
{
p.SetState(189)
p.Match(FqlParserSortDirection)
}
}
return localctx
}
// ICollectClauseContext is an interface to support dynamic dispatch.
type ICollectClauseContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsCollectClauseContext differentiates from other interfaces.
IsCollectClauseContext()
}
type CollectClauseContext struct {
*antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyCollectClauseContext() *CollectClauseContext {
var p = new(CollectClauseContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
p.RuleIndex = FqlParserRULE_collectClause
return p
}
func (*CollectClauseContext) IsCollectClauseContext() {}
func NewCollectClauseContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CollectClauseContext {
var p = new(CollectClauseContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
p.parser = parser
p.RuleIndex = FqlParserRULE_collectClause
return p
}
func (s *CollectClauseContext) GetParser() antlr.Parser { return s.parser }
func (s *CollectClauseContext) Collect() antlr.TerminalNode {
return s.GetToken(FqlParserCollect, 0)
}
func (s *CollectClauseContext) CollectVariable() ICollectVariableContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*ICollectVariableContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(ICollectVariableContext)
}
func (s *CollectClauseContext) AllAssign() []antlr.TerminalNode {
return s.GetTokens(FqlParserAssign)
}
func (s *CollectClauseContext) Assign(i int) antlr.TerminalNode {
return s.GetToken(FqlParserAssign, i)
}
func (s *CollectClauseContext) Expression() IExpressionContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IExpressionContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(IExpressionContext)
}
func (s *CollectClauseContext) Into() antlr.TerminalNode {
return s.GetToken(FqlParserInto, 0)
}
func (s *CollectClauseContext) CollectGroupVariable() ICollectGroupVariableContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*ICollectGroupVariableContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(ICollectGroupVariableContext)
}
func (s *CollectClauseContext) Keep() antlr.TerminalNode {
return s.GetToken(FqlParserKeep, 0)
}
func (s *CollectClauseContext) CollectKeepVariable() ICollectKeepVariableContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*ICollectKeepVariableContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(ICollectKeepVariableContext)
}
func (s *CollectClauseContext) With() antlr.TerminalNode {
return s.GetToken(FqlParserWith, 0)
}
func (s *CollectClauseContext) Count() antlr.TerminalNode {
return s.GetToken(FqlParserCount, 0)
}
func (s *CollectClauseContext) CollectCountVariable() ICollectCountVariableContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*ICollectCountVariableContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(ICollectCountVariableContext)
}
func (s *CollectClauseContext) Aggregate() antlr.TerminalNode {
return s.GetToken(FqlParserAggregate, 0)
}
func (s *CollectClauseContext) CollectAggregateVariable() ICollectAggregateVariableContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*ICollectAggregateVariableContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(ICollectAggregateVariableContext)
}
func (s *CollectClauseContext) CollectAggregateExpression() ICollectAggregateExpressionContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*ICollectAggregateExpressionContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(ICollectAggregateExpressionContext)
}
func (s *CollectClauseContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *CollectClauseContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *CollectClauseContext) EnterRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.EnterCollectClause(s)
}
}
func (s *CollectClauseContext) ExitRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.ExitCollectClause(s)
}
}
func (s *CollectClauseContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case FqlParserVisitor:
return t.VisitCollectClause(s)
default:
return t.VisitChildren(s)
}
}
func (p *FqlParser) CollectClause() (localctx ICollectClauseContext) {
localctx = NewCollectClauseContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 28, FqlParserRULE_collectClause)
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(241)
p.GetErrorHandler().Sync(p)
switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 14, p.GetParserRuleContext()) {
case 1:
p.EnterOuterAlt(localctx, 1)
{
p.SetState(192)
p.Match(FqlParserCollect)
}
{
p.SetState(193)
p.CollectVariable()
}
{
p.SetState(194)
p.Match(FqlParserAssign)
}
{
p.SetState(195)
p.expression(0)
}
case 2:
p.EnterOuterAlt(localctx, 2)
{
p.SetState(197)
p.Match(FqlParserCollect)
}
{
p.SetState(198)
p.CollectVariable()
}
{
p.SetState(199)
p.Match(FqlParserAssign)
}
{
p.SetState(200)
p.expression(0)
}
{
p.SetState(201)
p.Match(FqlParserInto)
}
{
p.SetState(202)
p.CollectGroupVariable()
}
case 3:
p.EnterOuterAlt(localctx, 3)
{
p.SetState(204)
p.Match(FqlParserCollect)
}
{
p.SetState(205)
p.CollectVariable()
}
{
p.SetState(206)
p.Match(FqlParserAssign)
}
{
p.SetState(207)
p.expression(0)
}
{
p.SetState(208)
p.Match(FqlParserInto)
}
{
p.SetState(209)
p.CollectGroupVariable()
}
{
p.SetState(210)
p.Match(FqlParserKeep)
}
{
p.SetState(211)
p.CollectKeepVariable()
}
case 4:
p.EnterOuterAlt(localctx, 4)
{
p.SetState(213)
p.Match(FqlParserCollect)
}
{
p.SetState(214)
p.CollectVariable()
}
{
p.SetState(215)
p.Match(FqlParserAssign)
}
{
p.SetState(216)
p.expression(0)
}
{
p.SetState(217)
p.Match(FqlParserWith)
}
{
p.SetState(218)
p.Match(FqlParserCount)
}
{
p.SetState(219)
p.CollectCountVariable()
}
case 5:
p.EnterOuterAlt(localctx, 5)
{
p.SetState(221)
p.Match(FqlParserCollect)
}
{
p.SetState(222)
p.CollectVariable()
}
{
p.SetState(223)
p.Match(FqlParserAssign)
}
{
p.SetState(224)
p.expression(0)
}
{
p.SetState(225)
p.Match(FqlParserAggregate)
}
{
p.SetState(226)
p.CollectAggregateVariable()
}
{
p.SetState(227)
p.Match(FqlParserAssign)
}
{
p.SetState(228)
p.CollectAggregateExpression()
}
case 6:
p.EnterOuterAlt(localctx, 6)
{
p.SetState(230)
p.Match(FqlParserCollect)
}
{
p.SetState(231)
p.Match(FqlParserAggregate)
}
{
p.SetState(232)
p.CollectAggregateVariable()
}
{
p.SetState(233)
p.Match(FqlParserAssign)
}
{
p.SetState(234)
p.CollectAggregateExpression()
}
case 7:
p.EnterOuterAlt(localctx, 7)
{
p.SetState(236)
p.Match(FqlParserCollect)
}
{
p.SetState(237)
p.Match(FqlParserWith)
}
{
p.SetState(238)
p.Match(FqlParserCount)
}
{
p.SetState(239)
p.Match(FqlParserInto)
}
{
p.SetState(240)
p.CollectCountVariable()
}
}
return localctx
}
// ICollectVariableContext is an interface to support dynamic dispatch.
type ICollectVariableContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsCollectVariableContext differentiates from other interfaces.
IsCollectVariableContext()
}
type CollectVariableContext struct {
*antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyCollectVariableContext() *CollectVariableContext {
var p = new(CollectVariableContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
p.RuleIndex = FqlParserRULE_collectVariable
return p
}
func (*CollectVariableContext) IsCollectVariableContext() {}
func NewCollectVariableContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CollectVariableContext {
var p = new(CollectVariableContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
p.parser = parser
p.RuleIndex = FqlParserRULE_collectVariable
return p
}
func (s *CollectVariableContext) GetParser() antlr.Parser { return s.parser }
func (s *CollectVariableContext) Identifier() antlr.TerminalNode {
return s.GetToken(FqlParserIdentifier, 0)
}
func (s *CollectVariableContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *CollectVariableContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *CollectVariableContext) EnterRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.EnterCollectVariable(s)
}
}
func (s *CollectVariableContext) ExitRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.ExitCollectVariable(s)
}
}
func (s *CollectVariableContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case FqlParserVisitor:
return t.VisitCollectVariable(s)
default:
return t.VisitChildren(s)
}
}
func (p *FqlParser) CollectVariable() (localctx ICollectVariableContext) {
localctx = NewCollectVariableContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 30, FqlParserRULE_collectVariable)
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(243)
p.Match(FqlParserIdentifier)
}
return localctx
}
// ICollectGroupVariableContext is an interface to support dynamic dispatch.
type ICollectGroupVariableContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsCollectGroupVariableContext differentiates from other interfaces.
IsCollectGroupVariableContext()
}
type CollectGroupVariableContext struct {
*antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyCollectGroupVariableContext() *CollectGroupVariableContext {
var p = new(CollectGroupVariableContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
p.RuleIndex = FqlParserRULE_collectGroupVariable
return p
}
func (*CollectGroupVariableContext) IsCollectGroupVariableContext() {}
func NewCollectGroupVariableContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CollectGroupVariableContext {
var p = new(CollectGroupVariableContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
p.parser = parser
p.RuleIndex = FqlParserRULE_collectGroupVariable
return p
}
func (s *CollectGroupVariableContext) GetParser() antlr.Parser { return s.parser }
func (s *CollectGroupVariableContext) Identifier() antlr.TerminalNode {
return s.GetToken(FqlParserIdentifier, 0)
}
func (s *CollectGroupVariableContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *CollectGroupVariableContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *CollectGroupVariableContext) EnterRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.EnterCollectGroupVariable(s)
}
}
func (s *CollectGroupVariableContext) ExitRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.ExitCollectGroupVariable(s)
}
}
func (s *CollectGroupVariableContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case FqlParserVisitor:
return t.VisitCollectGroupVariable(s)
default:
return t.VisitChildren(s)
}
}
func (p *FqlParser) CollectGroupVariable() (localctx ICollectGroupVariableContext) {
localctx = NewCollectGroupVariableContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 32, FqlParserRULE_collectGroupVariable)
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(245)
p.Match(FqlParserIdentifier)
}
return localctx
}
// ICollectKeepVariableContext is an interface to support dynamic dispatch.
type ICollectKeepVariableContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsCollectKeepVariableContext differentiates from other interfaces.
IsCollectKeepVariableContext()
}
type CollectKeepVariableContext struct {
*antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyCollectKeepVariableContext() *CollectKeepVariableContext {
var p = new(CollectKeepVariableContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
p.RuleIndex = FqlParserRULE_collectKeepVariable
return p
}
func (*CollectKeepVariableContext) IsCollectKeepVariableContext() {}
func NewCollectKeepVariableContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CollectKeepVariableContext {
var p = new(CollectKeepVariableContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
p.parser = parser
p.RuleIndex = FqlParserRULE_collectKeepVariable
return p
}
func (s *CollectKeepVariableContext) GetParser() antlr.Parser { return s.parser }
func (s *CollectKeepVariableContext) Identifier() antlr.TerminalNode {
return s.GetToken(FqlParserIdentifier, 0)
}
func (s *CollectKeepVariableContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *CollectKeepVariableContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *CollectKeepVariableContext) EnterRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.EnterCollectKeepVariable(s)
}
}
func (s *CollectKeepVariableContext) ExitRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.ExitCollectKeepVariable(s)
}
}
func (s *CollectKeepVariableContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case FqlParserVisitor:
return t.VisitCollectKeepVariable(s)
default:
return t.VisitChildren(s)
}
}
func (p *FqlParser) CollectKeepVariable() (localctx ICollectKeepVariableContext) {
localctx = NewCollectKeepVariableContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 34, FqlParserRULE_collectKeepVariable)
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(247)
p.Match(FqlParserIdentifier)
}
return localctx
}
// ICollectCountVariableContext is an interface to support dynamic dispatch.
type ICollectCountVariableContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsCollectCountVariableContext differentiates from other interfaces.
IsCollectCountVariableContext()
}
type CollectCountVariableContext struct {
*antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyCollectCountVariableContext() *CollectCountVariableContext {
var p = new(CollectCountVariableContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
p.RuleIndex = FqlParserRULE_collectCountVariable
return p
}
func (*CollectCountVariableContext) IsCollectCountVariableContext() {}
func NewCollectCountVariableContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CollectCountVariableContext {
var p = new(CollectCountVariableContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
p.parser = parser
p.RuleIndex = FqlParserRULE_collectCountVariable
return p
}
func (s *CollectCountVariableContext) GetParser() antlr.Parser { return s.parser }
func (s *CollectCountVariableContext) Identifier() antlr.TerminalNode {
return s.GetToken(FqlParserIdentifier, 0)
}
func (s *CollectCountVariableContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *CollectCountVariableContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *CollectCountVariableContext) EnterRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.EnterCollectCountVariable(s)
}
}
func (s *CollectCountVariableContext) ExitRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.ExitCollectCountVariable(s)
}
}
func (s *CollectCountVariableContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case FqlParserVisitor:
return t.VisitCollectCountVariable(s)
default:
return t.VisitChildren(s)
}
}
func (p *FqlParser) CollectCountVariable() (localctx ICollectCountVariableContext) {
localctx = NewCollectCountVariableContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 36, FqlParserRULE_collectCountVariable)
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(249)
p.Match(FqlParserIdentifier)
}
return localctx
}
// ICollectAggregateVariableContext is an interface to support dynamic dispatch.
type ICollectAggregateVariableContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsCollectAggregateVariableContext differentiates from other interfaces.
IsCollectAggregateVariableContext()
}
type CollectAggregateVariableContext struct {
*antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyCollectAggregateVariableContext() *CollectAggregateVariableContext {
var p = new(CollectAggregateVariableContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
p.RuleIndex = FqlParserRULE_collectAggregateVariable
return p
}
func (*CollectAggregateVariableContext) IsCollectAggregateVariableContext() {}
func NewCollectAggregateVariableContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CollectAggregateVariableContext {
var p = new(CollectAggregateVariableContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
p.parser = parser
p.RuleIndex = FqlParserRULE_collectAggregateVariable
return p
}
func (s *CollectAggregateVariableContext) GetParser() antlr.Parser { return s.parser }
func (s *CollectAggregateVariableContext) Identifier() antlr.TerminalNode {
return s.GetToken(FqlParserIdentifier, 0)
}
func (s *CollectAggregateVariableContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *CollectAggregateVariableContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *CollectAggregateVariableContext) EnterRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.EnterCollectAggregateVariable(s)
}
}
func (s *CollectAggregateVariableContext) ExitRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.ExitCollectAggregateVariable(s)
}
}
func (s *CollectAggregateVariableContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case FqlParserVisitor:
return t.VisitCollectAggregateVariable(s)
default:
return t.VisitChildren(s)
}
}
func (p *FqlParser) CollectAggregateVariable() (localctx ICollectAggregateVariableContext) {
localctx = NewCollectAggregateVariableContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 38, FqlParserRULE_collectAggregateVariable)
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(251)
p.Match(FqlParserIdentifier)
}
return localctx
}
// ICollectAggregateExpressionContext is an interface to support dynamic dispatch.
type ICollectAggregateExpressionContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsCollectAggregateExpressionContext differentiates from other interfaces.
IsCollectAggregateExpressionContext()
}
type CollectAggregateExpressionContext struct {
*antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyCollectAggregateExpressionContext() *CollectAggregateExpressionContext {
var p = new(CollectAggregateExpressionContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
p.RuleIndex = FqlParserRULE_collectAggregateExpression
return p
}
func (*CollectAggregateExpressionContext) IsCollectAggregateExpressionContext() {}
func NewCollectAggregateExpressionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CollectAggregateExpressionContext {
var p = new(CollectAggregateExpressionContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
p.parser = parser
p.RuleIndex = FqlParserRULE_collectAggregateExpression
return p
}
func (s *CollectAggregateExpressionContext) GetParser() antlr.Parser { return s.parser }
func (s *CollectAggregateExpressionContext) Expression() IExpressionContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IExpressionContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(IExpressionContext)
}
func (s *CollectAggregateExpressionContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *CollectAggregateExpressionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *CollectAggregateExpressionContext) EnterRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.EnterCollectAggregateExpression(s)
}
}
func (s *CollectAggregateExpressionContext) ExitRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.ExitCollectAggregateExpression(s)
}
}
func (s *CollectAggregateExpressionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case FqlParserVisitor:
return t.VisitCollectAggregateExpression(s)
default:
return t.VisitChildren(s)
}
}
func (p *FqlParser) CollectAggregateExpression() (localctx ICollectAggregateExpressionContext) {
localctx = NewCollectAggregateExpressionContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 40, FqlParserRULE_collectAggregateExpression)
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(253)
p.expression(0)
}
return localctx
}
// ICollectOptionContext is an interface to support dynamic dispatch.
type ICollectOptionContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsCollectOptionContext differentiates from other interfaces.
IsCollectOptionContext()
}
type CollectOptionContext struct {
*antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyCollectOptionContext() *CollectOptionContext {
var p = new(CollectOptionContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
p.RuleIndex = FqlParserRULE_collectOption
return p
}
func (*CollectOptionContext) IsCollectOptionContext() {}
func NewCollectOptionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *CollectOptionContext {
var p = new(CollectOptionContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
p.parser = parser
p.RuleIndex = FqlParserRULE_collectOption
return p
}
func (s *CollectOptionContext) GetParser() antlr.Parser { return s.parser }
func (s *CollectOptionContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *CollectOptionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *CollectOptionContext) EnterRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.EnterCollectOption(s)
}
}
func (s *CollectOptionContext) ExitRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.ExitCollectOption(s)
}
}
func (s *CollectOptionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case FqlParserVisitor:
return t.VisitCollectOption(s)
default:
return t.VisitChildren(s)
}
}
func (p *FqlParser) CollectOption() (localctx ICollectOptionContext) {
localctx = NewCollectOptionContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 42, FqlParserRULE_collectOption)
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)
return localctx
}
// IForExpressionBodyContext is an interface to support dynamic dispatch.
type IForExpressionBodyContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsForExpressionBodyContext differentiates from other interfaces.
IsForExpressionBodyContext()
}
type ForExpressionBodyContext struct {
*antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyForExpressionBodyContext() *ForExpressionBodyContext {
var p = new(ForExpressionBodyContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
p.RuleIndex = FqlParserRULE_forExpressionBody
return p
}
func (*ForExpressionBodyContext) IsForExpressionBodyContext() {}
func NewForExpressionBodyContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ForExpressionBodyContext {
var p = new(ForExpressionBodyContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
p.parser = parser
p.RuleIndex = FqlParserRULE_forExpressionBody
return p
}
func (s *ForExpressionBodyContext) GetParser() antlr.Parser { return s.parser }
func (s *ForExpressionBodyContext) VariableDeclaration() IVariableDeclarationContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IVariableDeclarationContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(IVariableDeclarationContext)
}
func (s *ForExpressionBodyContext) FunctionCallExpression() IFunctionCallExpressionContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IFunctionCallExpressionContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(IFunctionCallExpressionContext)
}
func (s *ForExpressionBodyContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *ForExpressionBodyContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *ForExpressionBodyContext) EnterRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.EnterForExpressionBody(s)
}
}
func (s *ForExpressionBodyContext) ExitRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.ExitForExpressionBody(s)
}
}
func (s *ForExpressionBodyContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case FqlParserVisitor:
return t.VisitForExpressionBody(s)
default:
return t.VisitChildren(s)
}
}
func (p *FqlParser) ForExpressionBody() (localctx IForExpressionBodyContext) {
localctx = NewForExpressionBodyContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 44, FqlParserRULE_forExpressionBody)
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(259)
p.GetErrorHandler().Sync(p)
switch p.GetTokenStream().LA(1) {
case FqlParserLet:
p.EnterOuterAlt(localctx, 1)
{
p.SetState(257)
p.VariableDeclaration()
}
case FqlParserIdentifier:
p.EnterOuterAlt(localctx, 2)
{
p.SetState(258)
p.FunctionCallExpression()
}
default:
panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
}
return localctx
}
// IForExpressionReturnContext is an interface to support dynamic dispatch.
type IForExpressionReturnContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsForExpressionReturnContext differentiates from other interfaces.
IsForExpressionReturnContext()
}
type ForExpressionReturnContext struct {
*antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyForExpressionReturnContext() *ForExpressionReturnContext {
var p = new(ForExpressionReturnContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
p.RuleIndex = FqlParserRULE_forExpressionReturn
return p
}
func (*ForExpressionReturnContext) IsForExpressionReturnContext() {}
func NewForExpressionReturnContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ForExpressionReturnContext {
var p = new(ForExpressionReturnContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
p.parser = parser
p.RuleIndex = FqlParserRULE_forExpressionReturn
return p
}
func (s *ForExpressionReturnContext) GetParser() antlr.Parser { return s.parser }
func (s *ForExpressionReturnContext) ReturnExpression() IReturnExpressionContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IReturnExpressionContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(IReturnExpressionContext)
}
func (s *ForExpressionReturnContext) ForExpression() IForExpressionContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IForExpressionContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(IForExpressionContext)
}
func (s *ForExpressionReturnContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *ForExpressionReturnContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *ForExpressionReturnContext) EnterRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.EnterForExpressionReturn(s)
}
}
func (s *ForExpressionReturnContext) ExitRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.ExitForExpressionReturn(s)
}
}
func (s *ForExpressionReturnContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case FqlParserVisitor:
return t.VisitForExpressionReturn(s)
default:
return t.VisitChildren(s)
}
}
func (p *FqlParser) ForExpressionReturn() (localctx IForExpressionReturnContext) {
localctx = NewForExpressionReturnContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 46, FqlParserRULE_forExpressionReturn)
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(263)
p.GetErrorHandler().Sync(p)
switch p.GetTokenStream().LA(1) {
case FqlParserReturn:
p.EnterOuterAlt(localctx, 1)
{
p.SetState(261)
p.ReturnExpression()
}
case FqlParserFor:
p.EnterOuterAlt(localctx, 2)
{
p.SetState(262)
p.ForExpression()
}
default:
panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
}
return localctx
}
// IVariableDeclarationContext is an interface to support dynamic dispatch.
type IVariableDeclarationContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsVariableDeclarationContext differentiates from other interfaces.
IsVariableDeclarationContext()
}
type VariableDeclarationContext struct {
*antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyVariableDeclarationContext() *VariableDeclarationContext {
var p = new(VariableDeclarationContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
p.RuleIndex = FqlParserRULE_variableDeclaration
return p
}
func (*VariableDeclarationContext) IsVariableDeclarationContext() {}
func NewVariableDeclarationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *VariableDeclarationContext {
var p = new(VariableDeclarationContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
p.parser = parser
p.RuleIndex = FqlParserRULE_variableDeclaration
return p
}
func (s *VariableDeclarationContext) GetParser() antlr.Parser { return s.parser }
func (s *VariableDeclarationContext) Let() antlr.TerminalNode {
return s.GetToken(FqlParserLet, 0)
}
func (s *VariableDeclarationContext) Identifier() antlr.TerminalNode {
return s.GetToken(FqlParserIdentifier, 0)
}
func (s *VariableDeclarationContext) Assign() antlr.TerminalNode {
return s.GetToken(FqlParserAssign, 0)
}
func (s *VariableDeclarationContext) Expression() IExpressionContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IExpressionContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(IExpressionContext)
}
func (s *VariableDeclarationContext) OpenParen() antlr.TerminalNode {
return s.GetToken(FqlParserOpenParen, 0)
}
func (s *VariableDeclarationContext) ForExpression() IForExpressionContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IForExpressionContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(IForExpressionContext)
}
func (s *VariableDeclarationContext) CloseParen() antlr.TerminalNode {
return s.GetToken(FqlParserCloseParen, 0)
}
func (s *VariableDeclarationContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *VariableDeclarationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *VariableDeclarationContext) EnterRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.EnterVariableDeclaration(s)
}
}
func (s *VariableDeclarationContext) ExitRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.ExitVariableDeclaration(s)
}
}
func (s *VariableDeclarationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case FqlParserVisitor:
return t.VisitVariableDeclaration(s)
default:
return t.VisitChildren(s)
}
}
func (p *FqlParser) VariableDeclaration() (localctx IVariableDeclarationContext) {
localctx = NewVariableDeclarationContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 48, FqlParserRULE_variableDeclaration)
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(276)
p.GetErrorHandler().Sync(p)
switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 17, p.GetParserRuleContext()) {
case 1:
p.EnterOuterAlt(localctx, 1)
{
p.SetState(265)
p.Match(FqlParserLet)
}
{
p.SetState(266)
p.Match(FqlParserIdentifier)
}
{
p.SetState(267)
p.Match(FqlParserAssign)
}
{
p.SetState(268)
p.expression(0)
}
case 2:
p.EnterOuterAlt(localctx, 2)
{
p.SetState(269)
p.Match(FqlParserLet)
}
{
p.SetState(270)
p.Match(FqlParserIdentifier)
}
{
p.SetState(271)
p.Match(FqlParserAssign)
}
{
p.SetState(272)
p.Match(FqlParserOpenParen)
}
{
p.SetState(273)
p.ForExpression()
}
{
p.SetState(274)
p.Match(FqlParserCloseParen)
}
}
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, 50, 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)
{
p.SetState(278)
p.Match(FqlParserIdentifier)
}
return localctx
}
// IArrayLiteralContext is an interface to support dynamic dispatch.
type IArrayLiteralContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsArrayLiteralContext differentiates from other interfaces.
IsArrayLiteralContext()
}
type ArrayLiteralContext struct {
*antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyArrayLiteralContext() *ArrayLiteralContext {
var p = new(ArrayLiteralContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
p.RuleIndex = FqlParserRULE_arrayLiteral
return p
}
func (*ArrayLiteralContext) IsArrayLiteralContext() {}
func NewArrayLiteralContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ArrayLiteralContext {
var p = new(ArrayLiteralContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
p.parser = parser
p.RuleIndex = FqlParserRULE_arrayLiteral
return p
}
func (s *ArrayLiteralContext) GetParser() antlr.Parser { return s.parser }
func (s *ArrayLiteralContext) OpenBracket() antlr.TerminalNode {
return s.GetToken(FqlParserOpenBracket, 0)
}
func (s *ArrayLiteralContext) CloseBracket() antlr.TerminalNode {
return s.GetToken(FqlParserCloseBracket, 0)
}
func (s *ArrayLiteralContext) ArrayElementList() IArrayElementListContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IArrayElementListContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(IArrayElementListContext)
}
func (s *ArrayLiteralContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *ArrayLiteralContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *ArrayLiteralContext) EnterRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.EnterArrayLiteral(s)
}
}
func (s *ArrayLiteralContext) ExitRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.ExitArrayLiteral(s)
}
}
func (s *ArrayLiteralContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case FqlParserVisitor:
return t.VisitArrayLiteral(s)
default:
return t.VisitChildren(s)
}
}
func (p *FqlParser) ArrayLiteral() (localctx IArrayLiteralContext) {
localctx = NewArrayLiteralContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 52, FqlParserRULE_arrayLiteral)
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)
{
p.SetState(280)
p.Match(FqlParserOpenBracket)
}
p.SetState(282)
p.GetErrorHandler().Sync(p)
_la = p.GetTokenStream().LA(1)
if (((_la)&-(0x1f+1)) == 0 && ((1<<uint(_la))&((1<<FqlParserOpenBracket)|(1<<FqlParserOpenParen)|(1<<FqlParserOpenBrace)|(1<<FqlParserPlus)|(1<<FqlParserMinus)|(1<<FqlParserMinusMinus)|(1<<FqlParserPlusPlus))) != 0) || (((_la-45)&-(0x1f+1)) == 0 && ((1<<uint((_la-45)))&((1<<(FqlParserNone-45))|(1<<(FqlParserNull-45))|(1<<(FqlParserBooleanLiteral-45))|(1<<(FqlParserNot-45))|(1<<(FqlParserIdentifier-45))|(1<<(FqlParserStringLiteral-45))|(1<<(FqlParserIntegerLiteral-45))|(1<<(FqlParserFloatLiteral-45)))) != 0) {
{
p.SetState(281)
p.ArrayElementList()
}
}
{
p.SetState(284)
p.Match(FqlParserCloseBracket)
}
return localctx
}
// IObjectLiteralContext is an interface to support dynamic dispatch.
type IObjectLiteralContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsObjectLiteralContext differentiates from other interfaces.
IsObjectLiteralContext()
}
type ObjectLiteralContext struct {
*antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyObjectLiteralContext() *ObjectLiteralContext {
var p = new(ObjectLiteralContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
p.RuleIndex = FqlParserRULE_objectLiteral
return p
}
func (*ObjectLiteralContext) IsObjectLiteralContext() {}
func NewObjectLiteralContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ObjectLiteralContext {
var p = new(ObjectLiteralContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
p.parser = parser
p.RuleIndex = FqlParserRULE_objectLiteral
return p
}
func (s *ObjectLiteralContext) GetParser() antlr.Parser { return s.parser }
func (s *ObjectLiteralContext) OpenBrace() antlr.TerminalNode {
return s.GetToken(FqlParserOpenBrace, 0)
}
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 {
return s
}
func (s *ObjectLiteralContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *ObjectLiteralContext) EnterRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.EnterObjectLiteral(s)
}
}
func (s *ObjectLiteralContext) ExitRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.ExitObjectLiteral(s)
}
}
func (s *ObjectLiteralContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case FqlParserVisitor:
return t.VisitObjectLiteral(s)
default:
return t.VisitChildren(s)
}
}
func (p *FqlParser) ObjectLiteral() (localctx IObjectLiteralContext) {
localctx = NewObjectLiteralContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 54, FqlParserRULE_objectLiteral)
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)
}
}
}()
var _alt int
p.EnterOuterAlt(localctx, 1)
{
p.SetState(286)
p.Match(FqlParserOpenBrace)
}
p.SetState(295)
p.GetErrorHandler().Sync(p)
_la = p.GetTokenStream().LA(1)
if _la == FqlParserOpenBracket || _la == FqlParserIdentifier {
{
p.SetState(287)
p.PropertyAssignment()
}
p.SetState(292)
p.GetErrorHandler().Sync(p)
_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 19, p.GetParserRuleContext())
for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
if _alt == 1 {
{
p.SetState(288)
p.Match(FqlParserComma)
}
{
p.SetState(289)
p.PropertyAssignment()
}
}
p.SetState(294)
p.GetErrorHandler().Sync(p)
_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 19, p.GetParserRuleContext())
}
}
p.SetState(298)
p.GetErrorHandler().Sync(p)
_la = p.GetTokenStream().LA(1)
if _la == FqlParserComma {
{
p.SetState(297)
p.Match(FqlParserComma)
}
}
{
p.SetState(300)
p.Match(FqlParserCloseBrace)
}
return localctx
}
// IBooleanLiteralContext is an interface to support dynamic dispatch.
type IBooleanLiteralContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsBooleanLiteralContext differentiates from other interfaces.
IsBooleanLiteralContext()
}
type BooleanLiteralContext struct {
*antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyBooleanLiteralContext() *BooleanLiteralContext {
var p = new(BooleanLiteralContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
p.RuleIndex = FqlParserRULE_booleanLiteral
return p
}
func (*BooleanLiteralContext) IsBooleanLiteralContext() {}
func NewBooleanLiteralContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *BooleanLiteralContext {
var p = new(BooleanLiteralContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
p.parser = parser
p.RuleIndex = FqlParserRULE_booleanLiteral
return p
}
func (s *BooleanLiteralContext) GetParser() antlr.Parser { return s.parser }
func (s *BooleanLiteralContext) BooleanLiteral() antlr.TerminalNode {
return s.GetToken(FqlParserBooleanLiteral, 0)
}
func (s *BooleanLiteralContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *BooleanLiteralContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *BooleanLiteralContext) EnterRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.EnterBooleanLiteral(s)
}
}
func (s *BooleanLiteralContext) ExitRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.ExitBooleanLiteral(s)
}
}
func (s *BooleanLiteralContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case FqlParserVisitor:
return t.VisitBooleanLiteral(s)
default:
return t.VisitChildren(s)
}
}
func (p *FqlParser) BooleanLiteral() (localctx IBooleanLiteralContext) {
localctx = NewBooleanLiteralContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 56, FqlParserRULE_booleanLiteral)
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(302)
p.Match(FqlParserBooleanLiteral)
}
return localctx
}
// IStringLiteralContext is an interface to support dynamic dispatch.
type IStringLiteralContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsStringLiteralContext differentiates from other interfaces.
IsStringLiteralContext()
}
type StringLiteralContext struct {
*antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyStringLiteralContext() *StringLiteralContext {
var p = new(StringLiteralContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
p.RuleIndex = FqlParserRULE_stringLiteral
return p
}
func (*StringLiteralContext) IsStringLiteralContext() {}
func NewStringLiteralContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *StringLiteralContext {
var p = new(StringLiteralContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
p.parser = parser
p.RuleIndex = FqlParserRULE_stringLiteral
return p
}
func (s *StringLiteralContext) GetParser() antlr.Parser { return s.parser }
func (s *StringLiteralContext) StringLiteral() antlr.TerminalNode {
return s.GetToken(FqlParserStringLiteral, 0)
}
func (s *StringLiteralContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *StringLiteralContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *StringLiteralContext) EnterRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.EnterStringLiteral(s)
}
}
func (s *StringLiteralContext) ExitRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.ExitStringLiteral(s)
}
}
func (s *StringLiteralContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case FqlParserVisitor:
return t.VisitStringLiteral(s)
default:
return t.VisitChildren(s)
}
}
func (p *FqlParser) StringLiteral() (localctx IStringLiteralContext) {
localctx = NewStringLiteralContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 58, FqlParserRULE_stringLiteral)
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(304)
p.Match(FqlParserStringLiteral)
}
return localctx
}
// IIntegerLiteralContext is an interface to support dynamic dispatch.
type IIntegerLiteralContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsIntegerLiteralContext differentiates from other interfaces.
IsIntegerLiteralContext()
}
type IntegerLiteralContext struct {
*antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyIntegerLiteralContext() *IntegerLiteralContext {
var p = new(IntegerLiteralContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
p.RuleIndex = FqlParserRULE_integerLiteral
return p
}
func (*IntegerLiteralContext) IsIntegerLiteralContext() {}
func NewIntegerLiteralContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *IntegerLiteralContext {
var p = new(IntegerLiteralContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
p.parser = parser
p.RuleIndex = FqlParserRULE_integerLiteral
return p
}
func (s *IntegerLiteralContext) GetParser() antlr.Parser { return s.parser }
func (s *IntegerLiteralContext) IntegerLiteral() antlr.TerminalNode {
return s.GetToken(FqlParserIntegerLiteral, 0)
}
func (s *IntegerLiteralContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *IntegerLiteralContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *IntegerLiteralContext) EnterRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.EnterIntegerLiteral(s)
}
}
func (s *IntegerLiteralContext) ExitRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.ExitIntegerLiteral(s)
}
}
func (s *IntegerLiteralContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case FqlParserVisitor:
return t.VisitIntegerLiteral(s)
default:
return t.VisitChildren(s)
}
}
func (p *FqlParser) IntegerLiteral() (localctx IIntegerLiteralContext) {
localctx = NewIntegerLiteralContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 60, FqlParserRULE_integerLiteral)
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(306)
p.Match(FqlParserIntegerLiteral)
}
return localctx
}
// IFloatLiteralContext is an interface to support dynamic dispatch.
type IFloatLiteralContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsFloatLiteralContext differentiates from other interfaces.
IsFloatLiteralContext()
}
type FloatLiteralContext struct {
*antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyFloatLiteralContext() *FloatLiteralContext {
var p = new(FloatLiteralContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
p.RuleIndex = FqlParserRULE_floatLiteral
return p
}
func (*FloatLiteralContext) IsFloatLiteralContext() {}
func NewFloatLiteralContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *FloatLiteralContext {
var p = new(FloatLiteralContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
p.parser = parser
p.RuleIndex = FqlParserRULE_floatLiteral
return p
}
func (s *FloatLiteralContext) GetParser() antlr.Parser { return s.parser }
func (s *FloatLiteralContext) FloatLiteral() antlr.TerminalNode {
return s.GetToken(FqlParserFloatLiteral, 0)
}
func (s *FloatLiteralContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *FloatLiteralContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *FloatLiteralContext) EnterRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.EnterFloatLiteral(s)
}
}
func (s *FloatLiteralContext) ExitRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.ExitFloatLiteral(s)
}
}
func (s *FloatLiteralContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case FqlParserVisitor:
return t.VisitFloatLiteral(s)
default:
return t.VisitChildren(s)
}
}
func (p *FqlParser) FloatLiteral() (localctx IFloatLiteralContext) {
localctx = NewFloatLiteralContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 62, FqlParserRULE_floatLiteral)
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(308)
p.Match(FqlParserFloatLiteral)
}
return localctx
}
// INoneLiteralContext is an interface to support dynamic dispatch.
type INoneLiteralContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsNoneLiteralContext differentiates from other interfaces.
IsNoneLiteralContext()
}
type NoneLiteralContext struct {
*antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyNoneLiteralContext() *NoneLiteralContext {
var p = new(NoneLiteralContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
p.RuleIndex = FqlParserRULE_noneLiteral
return p
}
func (*NoneLiteralContext) IsNoneLiteralContext() {}
func NewNoneLiteralContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *NoneLiteralContext {
var p = new(NoneLiteralContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
p.parser = parser
p.RuleIndex = FqlParserRULE_noneLiteral
return p
}
func (s *NoneLiteralContext) GetParser() antlr.Parser { return s.parser }
func (s *NoneLiteralContext) Null() antlr.TerminalNode {
return s.GetToken(FqlParserNull, 0)
}
func (s *NoneLiteralContext) None() antlr.TerminalNode {
return s.GetToken(FqlParserNone, 0)
}
func (s *NoneLiteralContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *NoneLiteralContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *NoneLiteralContext) EnterRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.EnterNoneLiteral(s)
}
}
func (s *NoneLiteralContext) ExitRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.ExitNoneLiteral(s)
}
}
func (s *NoneLiteralContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case FqlParserVisitor:
return t.VisitNoneLiteral(s)
default:
return t.VisitChildren(s)
}
}
func (p *FqlParser) NoneLiteral() (localctx INoneLiteralContext) {
localctx = NewNoneLiteralContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 64, FqlParserRULE_noneLiteral)
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)
{
p.SetState(310)
_la = p.GetTokenStream().LA(1)
if !(_la == FqlParserNone || _la == FqlParserNull) {
p.GetErrorHandler().RecoverInline(p)
} else {
p.GetErrorHandler().ReportMatch(p)
p.Consume()
}
}
return localctx
}
// IArrayElementListContext is an interface to support dynamic dispatch.
type IArrayElementListContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsArrayElementListContext differentiates from other interfaces.
IsArrayElementListContext()
}
type ArrayElementListContext struct {
*antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyArrayElementListContext() *ArrayElementListContext {
var p = new(ArrayElementListContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
p.RuleIndex = FqlParserRULE_arrayElementList
return p
}
func (*ArrayElementListContext) IsArrayElementListContext() {}
func NewArrayElementListContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ArrayElementListContext {
var p = new(ArrayElementListContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
p.parser = parser
p.RuleIndex = FqlParserRULE_arrayElementList
return p
}
func (s *ArrayElementListContext) GetParser() antlr.Parser { return s.parser }
func (s *ArrayElementListContext) 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 *ArrayElementListContext) Expression(i int) IExpressionContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IExpressionContext)(nil)).Elem(), i)
if t == nil {
return nil
}
return t.(IExpressionContext)
}
func (s *ArrayElementListContext) AllComma() []antlr.TerminalNode {
return s.GetTokens(FqlParserComma)
}
func (s *ArrayElementListContext) Comma(i int) antlr.TerminalNode {
return s.GetToken(FqlParserComma, i)
}
func (s *ArrayElementListContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *ArrayElementListContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *ArrayElementListContext) EnterRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.EnterArrayElementList(s)
}
}
func (s *ArrayElementListContext) ExitRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.ExitArrayElementList(s)
}
}
func (s *ArrayElementListContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case FqlParserVisitor:
return t.VisitArrayElementList(s)
default:
return t.VisitChildren(s)
}
}
func (p *FqlParser) ArrayElementList() (localctx IArrayElementListContext) {
localctx = NewArrayElementListContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 66, FqlParserRULE_arrayElementList)
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)
{
p.SetState(312)
p.expression(0)
}
p.SetState(321)
p.GetErrorHandler().Sync(p)
_la = p.GetTokenStream().LA(1)
for _la == FqlParserComma {
p.SetState(314)
p.GetErrorHandler().Sync(p)
_la = p.GetTokenStream().LA(1)
for ok := true; ok; ok = _la == FqlParserComma {
{
p.SetState(313)
p.Match(FqlParserComma)
}
p.SetState(316)
p.GetErrorHandler().Sync(p)
_la = p.GetTokenStream().LA(1)
}
{
p.SetState(318)
p.expression(0)
}
p.SetState(323)
p.GetErrorHandler().Sync(p)
_la = p.GetTokenStream().LA(1)
}
return localctx
}
// IPropertyAssignmentContext is an interface to support dynamic dispatch.
type IPropertyAssignmentContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsPropertyAssignmentContext differentiates from other interfaces.
IsPropertyAssignmentContext()
}
type PropertyAssignmentContext struct {
*antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyPropertyAssignmentContext() *PropertyAssignmentContext {
var p = new(PropertyAssignmentContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
p.RuleIndex = FqlParserRULE_propertyAssignment
return p
}
func (*PropertyAssignmentContext) IsPropertyAssignmentContext() {}
func NewPropertyAssignmentContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *PropertyAssignmentContext {
var p = new(PropertyAssignmentContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
p.parser = parser
p.RuleIndex = FqlParserRULE_propertyAssignment
return p
}
func (s *PropertyAssignmentContext) GetParser() antlr.Parser { return s.parser }
func (s *PropertyAssignmentContext) PropertyName() IPropertyNameContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IPropertyNameContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(IPropertyNameContext)
}
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) ShorthandPropertyName() IShorthandPropertyNameContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IShorthandPropertyNameContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(IShorthandPropertyNameContext)
}
func (s *PropertyAssignmentContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *PropertyAssignmentContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *PropertyAssignmentContext) EnterRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.EnterPropertyAssignment(s)
}
}
func (s *PropertyAssignmentContext) ExitRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.ExitPropertyAssignment(s)
}
}
func (s *PropertyAssignmentContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case FqlParserVisitor:
return t.VisitPropertyAssignment(s)
default:
return t.VisitChildren(s)
}
}
func (p *FqlParser) PropertyAssignment() (localctx IPropertyAssignmentContext) {
localctx = NewPropertyAssignmentContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 68, FqlParserRULE_propertyAssignment)
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(333)
p.GetErrorHandler().Sync(p)
switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 24, p.GetParserRuleContext()) {
case 1:
p.EnterOuterAlt(localctx, 1)
{
p.SetState(324)
p.PropertyName()
}
{
p.SetState(325)
p.Match(FqlParserColon)
}
{
p.SetState(326)
p.expression(0)
}
case 2:
p.EnterOuterAlt(localctx, 2)
{
p.SetState(328)
p.ComputedPropertyName()
}
{
p.SetState(329)
p.Match(FqlParserColon)
}
{
p.SetState(330)
p.expression(0)
}
case 3:
p.EnterOuterAlt(localctx, 3)
{
p.SetState(332)
p.ShorthandPropertyName()
}
}
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()
}
type MemberExpressionContext struct {
*antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyMemberExpressionContext() *MemberExpressionContext {
var p = new(MemberExpressionContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
p.RuleIndex = FqlParserRULE_memberExpression
return p
}
func (*MemberExpressionContext) IsMemberExpressionContext() {}
func NewMemberExpressionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *MemberExpressionContext {
var p = new(MemberExpressionContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
p.parser = parser
p.RuleIndex = FqlParserRULE_memberExpression
return p
}
func (s *MemberExpressionContext) GetParser() antlr.Parser { return s.parser }
func (s *MemberExpressionContext) Identifier() antlr.TerminalNode {
return s.GetToken(FqlParserIdentifier, 0)
}
func (s *MemberExpressionContext) AllDot() []antlr.TerminalNode {
return s.GetTokens(FqlParserDot)
}
func (s *MemberExpressionContext) Dot(i int) antlr.TerminalNode {
return s.GetToken(FqlParserDot, i)
}
func (s *MemberExpressionContext) AllPropertyName() []IPropertyNameContext {
var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IPropertyNameContext)(nil)).Elem())
var tst = make([]IPropertyNameContext, len(ts))
for i, t := range ts {
if t != nil {
tst[i] = t.(IPropertyNameContext)
}
}
return tst
}
func (s *MemberExpressionContext) PropertyName(i int) IPropertyNameContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IPropertyNameContext)(nil)).Elem(), i)
if t == nil {
return nil
}
return t.(IPropertyNameContext)
}
func (s *MemberExpressionContext) AllComputedPropertyName() []IComputedPropertyNameContext {
var ts = s.GetTypedRuleContexts(reflect.TypeOf((*IComputedPropertyNameContext)(nil)).Elem())
var tst = make([]IComputedPropertyNameContext, len(ts))
for i, t := range ts {
if t != nil {
tst[i] = t.(IComputedPropertyNameContext)
}
}
return tst
}
func (s *MemberExpressionContext) ComputedPropertyName(i int) IComputedPropertyNameContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IComputedPropertyNameContext)(nil)).Elem(), i)
if t == nil {
return nil
}
return t.(IComputedPropertyNameContext)
}
func (s *MemberExpressionContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *MemberExpressionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *MemberExpressionContext) EnterRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.EnterMemberExpression(s)
}
}
func (s *MemberExpressionContext) ExitRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.ExitMemberExpression(s)
}
}
func (s *MemberExpressionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case FqlParserVisitor:
return t.VisitMemberExpression(s)
default:
return t.VisitChildren(s)
}
}
func (p *FqlParser) MemberExpression() (localctx IMemberExpressionContext) {
localctx = NewMemberExpressionContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 70, FqlParserRULE_memberExpression)
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)
}
}
}()
var _alt int
p.SetState(376)
p.GetErrorHandler().Sync(p)
switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 31, p.GetParserRuleContext()) {
case 1:
p.EnterOuterAlt(localctx, 1)
{
p.SetState(335)
p.Match(FqlParserIdentifier)
}
p.SetState(344)
p.GetErrorHandler().Sync(p)
_alt = 1
for ok := true; ok; ok = _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
switch _alt {
case 1:
{
p.SetState(336)
p.Match(FqlParserDot)
}
{
p.SetState(337)
p.PropertyName()
}
p.SetState(341)
p.GetErrorHandler().Sync(p)
_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 25, p.GetParserRuleContext())
for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
if _alt == 1 {
{
p.SetState(338)
p.ComputedPropertyName()
}
}
p.SetState(343)
p.GetErrorHandler().Sync(p)
_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 25, p.GetParserRuleContext())
}
default:
panic(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
}
p.SetState(346)
p.GetErrorHandler().Sync(p)
_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 26, p.GetParserRuleContext())
}
case 2:
p.EnterOuterAlt(localctx, 2)
{
p.SetState(348)
p.Match(FqlParserIdentifier)
}
{
p.SetState(349)
p.ComputedPropertyName()
}
p.SetState(360)
p.GetErrorHandler().Sync(p)
_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 28, p.GetParserRuleContext())
for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
if _alt == 1 {
{
p.SetState(350)
p.Match(FqlParserDot)
}
{
p.SetState(351)
p.PropertyName()
}
p.SetState(355)
p.GetErrorHandler().Sync(p)
_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 27, p.GetParserRuleContext())
for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
if _alt == 1 {
{
p.SetState(352)
p.ComputedPropertyName()
}
}
p.SetState(357)
p.GetErrorHandler().Sync(p)
_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 27, p.GetParserRuleContext())
}
}
p.SetState(362)
p.GetErrorHandler().Sync(p)
_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 28, p.GetParserRuleContext())
}
p.SetState(373)
p.GetErrorHandler().Sync(p)
_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 30, p.GetParserRuleContext())
for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
if _alt == 1 {
{
p.SetState(363)
p.ComputedPropertyName()
}
p.SetState(368)
p.GetErrorHandler().Sync(p)
_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 29, p.GetParserRuleContext())
for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
if _alt == 1 {
{
p.SetState(364)
p.Match(FqlParserDot)
}
{
p.SetState(365)
p.PropertyName()
}
}
p.SetState(370)
p.GetErrorHandler().Sync(p)
_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 29, p.GetParserRuleContext())
}
}
p.SetState(375)
p.GetErrorHandler().Sync(p)
_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 30, p.GetParserRuleContext())
}
}
return localctx
}
// IShorthandPropertyNameContext is an interface to support dynamic dispatch.
type IShorthandPropertyNameContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsShorthandPropertyNameContext differentiates from other interfaces.
IsShorthandPropertyNameContext()
}
type ShorthandPropertyNameContext struct {
*antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyShorthandPropertyNameContext() *ShorthandPropertyNameContext {
var p = new(ShorthandPropertyNameContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
p.RuleIndex = FqlParserRULE_shorthandPropertyName
return p
}
func (*ShorthandPropertyNameContext) IsShorthandPropertyNameContext() {}
func NewShorthandPropertyNameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ShorthandPropertyNameContext {
var p = new(ShorthandPropertyNameContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
p.parser = parser
p.RuleIndex = FqlParserRULE_shorthandPropertyName
return p
}
func (s *ShorthandPropertyNameContext) GetParser() antlr.Parser { return s.parser }
func (s *ShorthandPropertyNameContext) Variable() IVariableContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IVariableContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(IVariableContext)
}
func (s *ShorthandPropertyNameContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *ShorthandPropertyNameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *ShorthandPropertyNameContext) EnterRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.EnterShorthandPropertyName(s)
}
}
func (s *ShorthandPropertyNameContext) ExitRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.ExitShorthandPropertyName(s)
}
}
func (s *ShorthandPropertyNameContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case FqlParserVisitor:
return t.VisitShorthandPropertyName(s)
default:
return t.VisitChildren(s)
}
}
func (p *FqlParser) ShorthandPropertyName() (localctx IShorthandPropertyNameContext) {
localctx = NewShorthandPropertyNameContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 72, FqlParserRULE_shorthandPropertyName)
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(378)
p.Variable()
}
return localctx
}
// IComputedPropertyNameContext is an interface to support dynamic dispatch.
type IComputedPropertyNameContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsComputedPropertyNameContext differentiates from other interfaces.
IsComputedPropertyNameContext()
}
type ComputedPropertyNameContext struct {
*antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyComputedPropertyNameContext() *ComputedPropertyNameContext {
var p = new(ComputedPropertyNameContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
p.RuleIndex = FqlParserRULE_computedPropertyName
return p
}
func (*ComputedPropertyNameContext) IsComputedPropertyNameContext() {}
func NewComputedPropertyNameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ComputedPropertyNameContext {
var p = new(ComputedPropertyNameContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
p.parser = parser
p.RuleIndex = FqlParserRULE_computedPropertyName
return p
}
func (s *ComputedPropertyNameContext) GetParser() antlr.Parser { return s.parser }
func (s *ComputedPropertyNameContext) OpenBracket() antlr.TerminalNode {
return s.GetToken(FqlParserOpenBracket, 0)
}
func (s *ComputedPropertyNameContext) Expression() IExpressionContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IExpressionContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(IExpressionContext)
}
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 {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *ComputedPropertyNameContext) EnterRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.EnterComputedPropertyName(s)
}
}
func (s *ComputedPropertyNameContext) ExitRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.ExitComputedPropertyName(s)
}
}
func (s *ComputedPropertyNameContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case FqlParserVisitor:
return t.VisitComputedPropertyName(s)
default:
return t.VisitChildren(s)
}
}
func (p *FqlParser) ComputedPropertyName() (localctx IComputedPropertyNameContext) {
localctx = NewComputedPropertyNameContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 74, FqlParserRULE_computedPropertyName)
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(380)
p.Match(FqlParserOpenBracket)
}
{
p.SetState(381)
p.expression(0)
}
{
p.SetState(382)
p.Match(FqlParserCloseBracket)
}
return localctx
}
// IPropertyNameContext is an interface to support dynamic dispatch.
type IPropertyNameContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsPropertyNameContext differentiates from other interfaces.
IsPropertyNameContext()
}
type PropertyNameContext struct {
*antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyPropertyNameContext() *PropertyNameContext {
var p = new(PropertyNameContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
p.RuleIndex = FqlParserRULE_propertyName
return p
}
func (*PropertyNameContext) IsPropertyNameContext() {}
func NewPropertyNameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *PropertyNameContext {
var p = new(PropertyNameContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
p.parser = parser
p.RuleIndex = FqlParserRULE_propertyName
return p
}
func (s *PropertyNameContext) GetParser() antlr.Parser { return s.parser }
func (s *PropertyNameContext) Identifier() antlr.TerminalNode {
return s.GetToken(FqlParserIdentifier, 0)
}
func (s *PropertyNameContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *PropertyNameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *PropertyNameContext) EnterRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.EnterPropertyName(s)
}
}
func (s *PropertyNameContext) ExitRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.ExitPropertyName(s)
}
}
func (s *PropertyNameContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case FqlParserVisitor:
return t.VisitPropertyName(s)
default:
return t.VisitChildren(s)
}
}
func (p *FqlParser) PropertyName() (localctx IPropertyNameContext) {
localctx = NewPropertyNameContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 76, FqlParserRULE_propertyName)
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(384)
p.Match(FqlParserIdentifier)
}
return localctx
}
// IExpressionSequenceContext is an interface to support dynamic dispatch.
type IExpressionSequenceContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsExpressionSequenceContext differentiates from other interfaces.
IsExpressionSequenceContext()
}
type ExpressionSequenceContext struct {
*antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyExpressionSequenceContext() *ExpressionSequenceContext {
var p = new(ExpressionSequenceContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
p.RuleIndex = FqlParserRULE_expressionSequence
return p
}
func (*ExpressionSequenceContext) IsExpressionSequenceContext() {}
func NewExpressionSequenceContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ExpressionSequenceContext {
var p = new(ExpressionSequenceContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
p.parser = parser
p.RuleIndex = FqlParserRULE_expressionSequence
return p
}
func (s *ExpressionSequenceContext) GetParser() antlr.Parser { return s.parser }
func (s *ExpressionSequenceContext) 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 *ExpressionSequenceContext) Expression(i int) IExpressionContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IExpressionContext)(nil)).Elem(), i)
if t == nil {
return nil
}
return t.(IExpressionContext)
}
func (s *ExpressionSequenceContext) AllComma() []antlr.TerminalNode {
return s.GetTokens(FqlParserComma)
}
func (s *ExpressionSequenceContext) Comma(i int) antlr.TerminalNode {
return s.GetToken(FqlParserComma, i)
}
func (s *ExpressionSequenceContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *ExpressionSequenceContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *ExpressionSequenceContext) EnterRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.EnterExpressionSequence(s)
}
}
func (s *ExpressionSequenceContext) ExitRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.ExitExpressionSequence(s)
}
}
func (s *ExpressionSequenceContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case FqlParserVisitor:
return t.VisitExpressionSequence(s)
default:
return t.VisitChildren(s)
}
}
func (p *FqlParser) ExpressionSequence() (localctx IExpressionSequenceContext) {
localctx = NewExpressionSequenceContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 78, FqlParserRULE_expressionSequence)
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)
{
p.SetState(386)
p.expression(0)
}
p.SetState(391)
p.GetErrorHandler().Sync(p)
_la = p.GetTokenStream().LA(1)
for _la == FqlParserComma {
{
p.SetState(387)
p.Match(FqlParserComma)
}
{
p.SetState(388)
p.expression(0)
}
p.SetState(393)
p.GetErrorHandler().Sync(p)
_la = p.GetTokenStream().LA(1)
}
return localctx
}
// IFunctionCallExpressionContext is an interface to support dynamic dispatch.
type IFunctionCallExpressionContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsFunctionCallExpressionContext differentiates from other interfaces.
IsFunctionCallExpressionContext()
}
type FunctionCallExpressionContext struct {
*antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyFunctionCallExpressionContext() *FunctionCallExpressionContext {
var p = new(FunctionCallExpressionContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
p.RuleIndex = FqlParserRULE_functionCallExpression
return p
}
func (*FunctionCallExpressionContext) IsFunctionCallExpressionContext() {}
func NewFunctionCallExpressionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *FunctionCallExpressionContext {
var p = new(FunctionCallExpressionContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
p.parser = parser
p.RuleIndex = FqlParserRULE_functionCallExpression
return p
}
func (s *FunctionCallExpressionContext) GetParser() antlr.Parser { return s.parser }
func (s *FunctionCallExpressionContext) Identifier() antlr.TerminalNode {
return s.GetToken(FqlParserIdentifier, 0)
}
func (s *FunctionCallExpressionContext) Arguments() IArgumentsContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IArgumentsContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(IArgumentsContext)
}
func (s *FunctionCallExpressionContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *FunctionCallExpressionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *FunctionCallExpressionContext) EnterRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.EnterFunctionCallExpression(s)
}
}
func (s *FunctionCallExpressionContext) ExitRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.ExitFunctionCallExpression(s)
}
}
func (s *FunctionCallExpressionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case FqlParserVisitor:
return t.VisitFunctionCallExpression(s)
default:
return t.VisitChildren(s)
}
}
func (p *FqlParser) FunctionCallExpression() (localctx IFunctionCallExpressionContext) {
localctx = NewFunctionCallExpressionContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 80, FqlParserRULE_functionCallExpression)
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(394)
p.Match(FqlParserIdentifier)
}
{
p.SetState(395)
p.Arguments()
}
return localctx
}
// 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()
}
type ArgumentsContext struct {
*antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyArgumentsContext() *ArgumentsContext {
var p = new(ArgumentsContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
p.RuleIndex = FqlParserRULE_arguments
return p
}
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
}
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))
for i, t := range ts {
if t != nil {
tst[i] = t.(IExpressionContext)
}
}
return tst
}
func (s *ArgumentsContext) Expression(i int) IExpressionContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IExpressionContext)(nil)).Elem(), i)
if t == nil {
return nil
}
return t.(IExpressionContext)
}
func (s *ArgumentsContext) AllComma() []antlr.TerminalNode {
return s.GetTokens(FqlParserComma)
}
func (s *ArgumentsContext) Comma(i int) antlr.TerminalNode {
return s.GetToken(FqlParserComma, i)
}
func (s *ArgumentsContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *ArgumentsContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *ArgumentsContext) EnterRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.EnterArguments(s)
}
}
func (s *ArgumentsContext) ExitRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.ExitArguments(s)
}
}
func (s *ArgumentsContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case FqlParserVisitor:
return t.VisitArguments(s)
default:
return t.VisitChildren(s)
}
}
func (p *FqlParser) Arguments() (localctx IArgumentsContext) {
localctx = NewArgumentsContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 82, FqlParserRULE_arguments)
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)
{
p.SetState(397)
p.Match(FqlParserOpenParen)
}
p.SetState(406)
p.GetErrorHandler().Sync(p)
_la = p.GetTokenStream().LA(1)
if (((_la)&-(0x1f+1)) == 0 && ((1<<uint(_la))&((1<<FqlParserOpenBracket)|(1<<FqlParserOpenParen)|(1<<FqlParserOpenBrace)|(1<<FqlParserPlus)|(1<<FqlParserMinus)|(1<<FqlParserMinusMinus)|(1<<FqlParserPlusPlus))) != 0) || (((_la-45)&-(0x1f+1)) == 0 && ((1<<uint((_la-45)))&((1<<(FqlParserNone-45))|(1<<(FqlParserNull-45))|(1<<(FqlParserBooleanLiteral-45))|(1<<(FqlParserNot-45))|(1<<(FqlParserIdentifier-45))|(1<<(FqlParserStringLiteral-45))|(1<<(FqlParserIntegerLiteral-45))|(1<<(FqlParserFloatLiteral-45)))) != 0) {
{
p.SetState(398)
p.expression(0)
}
p.SetState(403)
p.GetErrorHandler().Sync(p)
_la = p.GetTokenStream().LA(1)
for _la == FqlParserComma {
{
p.SetState(399)
p.Match(FqlParserComma)
}
{
p.SetState(400)
p.expression(0)
}
p.SetState(405)
p.GetErrorHandler().Sync(p)
_la = p.GetTokenStream().LA(1)
}
}
{
p.SetState(408)
p.Match(FqlParserCloseParen)
}
return localctx
}
// IExpressionContext is an interface to support dynamic dispatch.
type IExpressionContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsExpressionContext differentiates from other interfaces.
IsExpressionContext()
}
type ExpressionContext struct {
*antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyExpressionContext() *ExpressionContext {
var p = new(ExpressionContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
p.RuleIndex = FqlParserRULE_expression
return p
}
func (*ExpressionContext) IsExpressionContext() {}
func NewExpressionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ExpressionContext {
var p = new(ExpressionContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
p.parser = parser
p.RuleIndex = FqlParserRULE_expression
return p
}
func (s *ExpressionContext) GetParser() antlr.Parser { return s.parser }
func (s *ExpressionContext) FunctionCallExpression() IFunctionCallExpressionContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IFunctionCallExpressionContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(IFunctionCallExpressionContext)
}
func (s *ExpressionContext) OpenParen() antlr.TerminalNode {
return s.GetToken(FqlParserOpenParen, 0)
}
func (s *ExpressionContext) ExpressionSequence() IExpressionSequenceContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IExpressionSequenceContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(IExpressionSequenceContext)
}
func (s *ExpressionContext) CloseParen() antlr.TerminalNode {
return s.GetToken(FqlParserCloseParen, 0)
}
func (s *ExpressionContext) PlusPlus() antlr.TerminalNode {
return s.GetToken(FqlParserPlusPlus, 0)
}
func (s *ExpressionContext) 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 *ExpressionContext) Expression(i int) IExpressionContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IExpressionContext)(nil)).Elem(), i)
if t == nil {
return nil
}
return t.(IExpressionContext)
}
func (s *ExpressionContext) MinusMinus() antlr.TerminalNode {
return s.GetToken(FqlParserMinusMinus, 0)
}
func (s *ExpressionContext) Plus() antlr.TerminalNode {
return s.GetToken(FqlParserPlus, 0)
}
func (s *ExpressionContext) Minus() antlr.TerminalNode {
return s.GetToken(FqlParserMinus, 0)
}
func (s *ExpressionContext) Not() antlr.TerminalNode {
return s.GetToken(FqlParserNot, 0)
}
func (s *ExpressionContext) StringLiteral() IStringLiteralContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IStringLiteralContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(IStringLiteralContext)
}
func (s *ExpressionContext) IntegerLiteral() IIntegerLiteralContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IIntegerLiteralContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(IIntegerLiteralContext)
}
func (s *ExpressionContext) FloatLiteral() IFloatLiteralContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IFloatLiteralContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(IFloatLiteralContext)
}
func (s *ExpressionContext) BooleanLiteral() IBooleanLiteralContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IBooleanLiteralContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(IBooleanLiteralContext)
}
func (s *ExpressionContext) ArrayLiteral() IArrayLiteralContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IArrayLiteralContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(IArrayLiteralContext)
}
func (s *ExpressionContext) ObjectLiteral() IObjectLiteralContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IObjectLiteralContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(IObjectLiteralContext)
}
func (s *ExpressionContext) Variable() IVariableContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IVariableContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(IVariableContext)
}
func (s *ExpressionContext) MemberExpression() IMemberExpressionContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IMemberExpressionContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(IMemberExpressionContext)
}
func (s *ExpressionContext) NoneLiteral() INoneLiteralContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*INoneLiteralContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(INoneLiteralContext)
}
func (s *ExpressionContext) EqualityOperator() IEqualityOperatorContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IEqualityOperatorContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(IEqualityOperatorContext)
}
func (s *ExpressionContext) LogicalOperator() ILogicalOperatorContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*ILogicalOperatorContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(ILogicalOperatorContext)
}
func (s *ExpressionContext) MathOperator() IMathOperatorContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IMathOperatorContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(IMathOperatorContext)
}
func (s *ExpressionContext) QuestionMark() antlr.TerminalNode {
return s.GetToken(FqlParserQuestionMark, 0)
}
func (s *ExpressionContext) Colon() antlr.TerminalNode {
return s.GetToken(FqlParserColon, 0)
}
func (s *ExpressionContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *ExpressionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *ExpressionContext) EnterRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.EnterExpression(s)
}
}
func (s *ExpressionContext) ExitRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.ExitExpression(s)
}
}
func (s *ExpressionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case FqlParserVisitor:
return t.VisitExpression(s)
default:
return t.VisitChildren(s)
}
}
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 := 84
p.EnterRecursionRule(localctx, 84, FqlParserRULE_expression, _p)
var _la int
defer func() {
p.UnrollRecursionContexts(_parentctx)
}()
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)
}
}
}()
var _alt int
p.EnterOuterAlt(localctx, 1)
p.SetState(435)
p.GetErrorHandler().Sync(p)
switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 35, p.GetParserRuleContext()) {
case 1:
{
p.SetState(411)
p.FunctionCallExpression()
}
case 2:
{
p.SetState(412)
p.Match(FqlParserOpenParen)
}
{
p.SetState(413)
p.ExpressionSequence()
}
{
p.SetState(414)
p.Match(FqlParserCloseParen)
}
case 3:
{
p.SetState(416)
p.Match(FqlParserPlusPlus)
}
{
p.SetState(417)
p.expression(15)
}
case 4:
{
p.SetState(418)
p.Match(FqlParserMinusMinus)
}
{
p.SetState(419)
p.expression(14)
}
case 5:
{
p.SetState(420)
p.Match(FqlParserPlus)
}
{
p.SetState(421)
p.expression(13)
}
case 6:
{
p.SetState(422)
p.Match(FqlParserMinus)
}
{
p.SetState(423)
p.expression(12)
}
case 7:
{
p.SetState(424)
p.Match(FqlParserNot)
}
{
p.SetState(425)
p.expression(11)
}
case 8:
{
p.SetState(426)
p.StringLiteral()
}
case 9:
{
p.SetState(427)
p.IntegerLiteral()
}
case 10:
{
p.SetState(428)
p.FloatLiteral()
}
case 11:
{
p.SetState(429)
p.BooleanLiteral()
}
case 12:
{
p.SetState(430)
p.ArrayLiteral()
}
case 13:
{
p.SetState(431)
p.ObjectLiteral()
}
case 14:
{
p.SetState(432)
p.Variable()
}
case 15:
{
p.SetState(433)
p.MemberExpression()
}
case 16:
{
p.SetState(434)
p.NoneLiteral()
}
}
p.GetParserRuleContext().SetStop(p.GetTokenStream().LT(-1))
p.SetState(462)
p.GetErrorHandler().Sync(p)
_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 38, p.GetParserRuleContext())
for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
if _alt == 1 {
if p.GetParseListeners() != nil {
p.TriggerExitRuleEvent()
}
_prevctx = localctx
p.SetState(460)
p.GetErrorHandler().Sync(p)
switch p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 37, p.GetParserRuleContext()) {
case 1:
localctx = NewExpressionContext(p, _parentctx, _parentState)
p.PushNewRecursionContext(localctx, _startState, FqlParserRULE_expression)
p.SetState(437)
if !(p.Precpred(p.GetParserRuleContext(), 22)) {
panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 22)", ""))
}
{
p.SetState(438)
p.EqualityOperator()
}
{
p.SetState(439)
p.expression(23)
}
case 2:
localctx = NewExpressionContext(p, _parentctx, _parentState)
p.PushNewRecursionContext(localctx, _startState, FqlParserRULE_expression)
p.SetState(441)
if !(p.Precpred(p.GetParserRuleContext(), 21)) {
panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 21)", ""))
}
{
p.SetState(442)
p.LogicalOperator()
}
{
p.SetState(443)
p.expression(22)
}
case 3:
localctx = NewExpressionContext(p, _parentctx, _parentState)
p.PushNewRecursionContext(localctx, _startState, FqlParserRULE_expression)
p.SetState(445)
if !(p.Precpred(p.GetParserRuleContext(), 20)) {
panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 20)", ""))
}
{
p.SetState(446)
p.MathOperator()
}
{
p.SetState(447)
p.expression(21)
}
case 4:
localctx = NewExpressionContext(p, _parentctx, _parentState)
p.PushNewRecursionContext(localctx, _startState, FqlParserRULE_expression)
p.SetState(449)
if !(p.Precpred(p.GetParserRuleContext(), 10)) {
panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 10)", ""))
}
{
p.SetState(450)
p.Match(FqlParserQuestionMark)
}
p.SetState(452)
p.GetErrorHandler().Sync(p)
_la = p.GetTokenStream().LA(1)
if (((_la)&-(0x1f+1)) == 0 && ((1<<uint(_la))&((1<<FqlParserOpenBracket)|(1<<FqlParserOpenParen)|(1<<FqlParserOpenBrace)|(1<<FqlParserPlus)|(1<<FqlParserMinus)|(1<<FqlParserMinusMinus)|(1<<FqlParserPlusPlus))) != 0) || (((_la-45)&-(0x1f+1)) == 0 && ((1<<uint((_la-45)))&((1<<(FqlParserNone-45))|(1<<(FqlParserNull-45))|(1<<(FqlParserBooleanLiteral-45))|(1<<(FqlParserNot-45))|(1<<(FqlParserIdentifier-45))|(1<<(FqlParserStringLiteral-45))|(1<<(FqlParserIntegerLiteral-45))|(1<<(FqlParserFloatLiteral-45)))) != 0) {
{
p.SetState(451)
p.expression(0)
}
}
{
p.SetState(454)
p.Match(FqlParserColon)
}
{
p.SetState(455)
p.expression(11)
}
case 5:
localctx = NewExpressionContext(p, _parentctx, _parentState)
p.PushNewRecursionContext(localctx, _startState, FqlParserRULE_expression)
p.SetState(456)
if !(p.Precpred(p.GetParserRuleContext(), 17)) {
panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 17)", ""))
}
{
p.SetState(457)
p.Match(FqlParserPlusPlus)
}
case 6:
localctx = NewExpressionContext(p, _parentctx, _parentState)
p.PushNewRecursionContext(localctx, _startState, FqlParserRULE_expression)
p.SetState(458)
if !(p.Precpred(p.GetParserRuleContext(), 16)) {
panic(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 16)", ""))
}
{
p.SetState(459)
p.Match(FqlParserMinusMinus)
}
}
}
p.SetState(464)
p.GetErrorHandler().Sync(p)
_alt = p.GetInterpreter().AdaptivePredict(p.GetTokenStream(), 38, p.GetParserRuleContext())
}
return localctx
}
// IReservedWordContext is an interface to support dynamic dispatch.
type IReservedWordContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsReservedWordContext differentiates from other interfaces.
IsReservedWordContext()
}
type ReservedWordContext struct {
*antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyReservedWordContext() *ReservedWordContext {
var p = new(ReservedWordContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
p.RuleIndex = FqlParserRULE_reservedWord
return p
}
func (*ReservedWordContext) IsReservedWordContext() {}
func NewReservedWordContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ReservedWordContext {
var p = new(ReservedWordContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
p.parser = parser
p.RuleIndex = FqlParserRULE_reservedWord
return p
}
func (s *ReservedWordContext) GetParser() antlr.Parser { return s.parser }
func (s *ReservedWordContext) Keyword() IKeywordContext {
var t = s.GetTypedRuleContext(reflect.TypeOf((*IKeywordContext)(nil)).Elem(), 0)
if t == nil {
return nil
}
return t.(IKeywordContext)
}
func (s *ReservedWordContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *ReservedWordContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *ReservedWordContext) EnterRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.EnterReservedWord(s)
}
}
func (s *ReservedWordContext) ExitRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.ExitReservedWord(s)
}
}
func (s *ReservedWordContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case FqlParserVisitor:
return t.VisitReservedWord(s)
default:
return t.VisitChildren(s)
}
}
func (p *FqlParser) ReservedWord() (localctx IReservedWordContext) {
localctx = NewReservedWordContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 86, FqlParserRULE_reservedWord)
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(465)
p.Keyword()
}
return localctx
}
// IKeywordContext is an interface to support dynamic dispatch.
type IKeywordContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsKeywordContext differentiates from other interfaces.
IsKeywordContext()
}
type KeywordContext struct {
*antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyKeywordContext() *KeywordContext {
var p = new(KeywordContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
p.RuleIndex = FqlParserRULE_keyword
return p
}
func (*KeywordContext) IsKeywordContext() {}
func NewKeywordContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *KeywordContext {
var p = new(KeywordContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
p.parser = parser
p.RuleIndex = FqlParserRULE_keyword
return p
}
func (s *KeywordContext) GetParser() antlr.Parser { return s.parser }
func (s *KeywordContext) Return() antlr.TerminalNode {
return s.GetToken(FqlParserReturn, 0)
}
func (s *KeywordContext) In() antlr.TerminalNode {
return s.GetToken(FqlParserIn, 0)
}
func (s *KeywordContext) Filter() antlr.TerminalNode {
return s.GetToken(FqlParserFilter, 0)
}
func (s *KeywordContext) Sort() antlr.TerminalNode {
return s.GetToken(FqlParserSort, 0)
}
func (s *KeywordContext) SortDirection() antlr.TerminalNode {
return s.GetToken(FqlParserSortDirection, 0)
}
func (s *KeywordContext) Limit() antlr.TerminalNode {
return s.GetToken(FqlParserLimit, 0)
}
func (s *KeywordContext) Let() antlr.TerminalNode {
return s.GetToken(FqlParserLet, 0)
}
func (s *KeywordContext) Collect() antlr.TerminalNode {
return s.GetToken(FqlParserCollect, 0)
}
func (s *KeywordContext) Distinct() antlr.TerminalNode {
return s.GetToken(FqlParserDistinct, 0)
}
func (s *KeywordContext) BooleanLiteral() antlr.TerminalNode {
return s.GetToken(FqlParserBooleanLiteral, 0)
}
func (s *KeywordContext) None() antlr.TerminalNode {
return s.GetToken(FqlParserNone, 0)
}
func (s *KeywordContext) Null() antlr.TerminalNode {
return s.GetToken(FqlParserNull, 0)
}
func (s *KeywordContext) All() antlr.TerminalNode {
return s.GetToken(FqlParserAll, 0)
}
func (s *KeywordContext) Any() antlr.TerminalNode {
return s.GetToken(FqlParserAny, 0)
}
func (s *KeywordContext) Aggregate() antlr.TerminalNode {
return s.GetToken(FqlParserAggregate, 0)
}
func (s *KeywordContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *KeywordContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *KeywordContext) EnterRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.EnterKeyword(s)
}
}
func (s *KeywordContext) ExitRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.ExitKeyword(s)
}
}
func (s *KeywordContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case FqlParserVisitor:
return t.VisitKeyword(s)
default:
return t.VisitChildren(s)
}
}
func (p *FqlParser) Keyword() (localctx IKeywordContext) {
localctx = NewKeywordContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 88, FqlParserRULE_keyword)
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)
{
p.SetState(467)
_la = p.GetTokenStream().LA(1)
if !(((_la-37)&-(0x1f+1)) == 0 && ((1<<uint((_la-37)))&((1<<(FqlParserReturn-37))|(1<<(FqlParserDistinct-37))|(1<<(FqlParserFilter-37))|(1<<(FqlParserSort-37))|(1<<(FqlParserLimit-37))|(1<<(FqlParserLet-37))|(1<<(FqlParserCollect-37))|(1<<(FqlParserSortDirection-37))|(1<<(FqlParserNone-37))|(1<<(FqlParserNull-37))|(1<<(FqlParserBooleanLiteral-37))|(1<<(FqlParserAll-37))|(1<<(FqlParserAny-37))|(1<<(FqlParserAggregate-37))|(1<<(FqlParserIn-37)))) != 0) {
p.GetErrorHandler().RecoverInline(p)
} else {
p.GetErrorHandler().ReportMatch(p)
p.Consume()
}
}
return localctx
}
// 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())
p.EnterRule(localctx, 90, FqlParserRULE_equalityOperator)
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)
{
p.SetState(469)
_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
}
// ILogicalOperatorContext is an interface to support dynamic dispatch.
type ILogicalOperatorContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsLogicalOperatorContext differentiates from other interfaces.
IsLogicalOperatorContext()
}
type LogicalOperatorContext struct {
*antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyLogicalOperatorContext() *LogicalOperatorContext {
var p = new(LogicalOperatorContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
p.RuleIndex = FqlParserRULE_logicalOperator
return p
}
func (*LogicalOperatorContext) IsLogicalOperatorContext() {}
func NewLogicalOperatorContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *LogicalOperatorContext {
var p = new(LogicalOperatorContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
p.parser = parser
p.RuleIndex = FqlParserRULE_logicalOperator
return p
}
func (s *LogicalOperatorContext) GetParser() antlr.Parser { return s.parser }
func (s *LogicalOperatorContext) And() antlr.TerminalNode {
return s.GetToken(FqlParserAnd, 0)
}
func (s *LogicalOperatorContext) Or() antlr.TerminalNode {
return s.GetToken(FqlParserOr, 0)
}
func (s *LogicalOperatorContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *LogicalOperatorContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *LogicalOperatorContext) EnterRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.EnterLogicalOperator(s)
}
}
func (s *LogicalOperatorContext) ExitRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.ExitLogicalOperator(s)
}
}
func (s *LogicalOperatorContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case FqlParserVisitor:
return t.VisitLogicalOperator(s)
default:
return t.VisitChildren(s)
}
}
func (p *FqlParser) LogicalOperator() (localctx ILogicalOperatorContext) {
localctx = NewLogicalOperatorContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 92, FqlParserRULE_logicalOperator)
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)
{
p.SetState(471)
_la = p.GetTokenStream().LA(1)
if !(_la == FqlParserAnd || _la == FqlParserOr) {
p.GetErrorHandler().RecoverInline(p)
} else {
p.GetErrorHandler().ReportMatch(p)
p.Consume()
}
}
return localctx
}
// IMathOperatorContext is an interface to support dynamic dispatch.
type IMathOperatorContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsMathOperatorContext differentiates from other interfaces.
IsMathOperatorContext()
}
type MathOperatorContext struct {
*antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyMathOperatorContext() *MathOperatorContext {
var p = new(MathOperatorContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(nil, -1)
p.RuleIndex = FqlParserRULE_mathOperator
return p
}
func (*MathOperatorContext) IsMathOperatorContext() {}
func NewMathOperatorContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *MathOperatorContext {
var p = new(MathOperatorContext)
p.BaseParserRuleContext = antlr.NewBaseParserRuleContext(parent, invokingState)
p.parser = parser
p.RuleIndex = FqlParserRULE_mathOperator
return p
}
func (s *MathOperatorContext) GetParser() antlr.Parser { return s.parser }
func (s *MathOperatorContext) Plus() antlr.TerminalNode {
return s.GetToken(FqlParserPlus, 0)
}
func (s *MathOperatorContext) Minus() antlr.TerminalNode {
return s.GetToken(FqlParserMinus, 0)
}
func (s *MathOperatorContext) Multi() antlr.TerminalNode {
return s.GetToken(FqlParserMulti, 0)
}
func (s *MathOperatorContext) Div() antlr.TerminalNode {
return s.GetToken(FqlParserDiv, 0)
}
func (s *MathOperatorContext) Mod() antlr.TerminalNode {
return s.GetToken(FqlParserMod, 0)
}
func (s *MathOperatorContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *MathOperatorContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *MathOperatorContext) EnterRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.EnterMathOperator(s)
}
}
func (s *MathOperatorContext) ExitRule(listener antlr.ParseTreeListener) {
if listenerT, ok := listener.(FqlParserListener); ok {
listenerT.ExitMathOperator(s)
}
}
func (s *MathOperatorContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case FqlParserVisitor:
return t.VisitMathOperator(s)
default:
return t.VisitChildren(s)
}
}
func (p *FqlParser) MathOperator() (localctx IMathOperatorContext) {
localctx = NewMathOperatorContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 94, FqlParserRULE_mathOperator)
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)
{
p.SetState(473)
_la = p.GetTokenStream().LA(1)
if !(((_la)&-(0x1f+1)) == 0 && ((1<<uint(_la))&((1<<FqlParserPlus)|(1<<FqlParserMinus)|(1<<FqlParserMulti)|(1<<FqlParserDiv)|(1<<FqlParserMod))) != 0) {
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) Like() antlr.TerminalNode {
return s.GetToken(FqlParserLike, 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())
p.EnterRule(localctx, 96, FqlParserRULE_unaryOperator)
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)
{
p.SetState(475)
_la = p.GetTokenStream().LA(1)
if !(_la == FqlParserPlus || _la == FqlParserMinus || _la == FqlParserLike || _la == FqlParserNot) {
p.GetErrorHandler().RecoverInline(p)
} else {
p.GetErrorHandler().ReportMatch(p)
p.Consume()
}
}
return localctx
}
func (p *FqlParser) Sempred(localctx antlr.RuleContext, ruleIndex, predIndex int) bool {
switch ruleIndex {
case 42:
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:
return p.Precpred(p.GetParserRuleContext(), 22)
case 1:
return p.Precpred(p.GetParserRuleContext(), 21)
case 2:
return p.Precpred(p.GetParserRuleContext(), 20)
case 3:
return p.Precpred(p.GetParserRuleContext(), 10)
case 4:
return p.Precpred(p.GetParserRuleContext(), 17)
case 5:
return p.Precpred(p.GetParserRuleContext(), 16)
default:
panic("No predicate with index: " + fmt.Sprint(predIndex))
}
}