Files
milvus/internal/parser/planparserv2/generated/plan_parser.go
T
Jamesandxiaofanluan f7727377fd fix: support contextual keywords as field names (#53968)
Fields named `iso` or `interval` can be created, but filters such as
`iso > 1` fail because the lexer emits a keyword token where the parser
expects an identifier.

Accept 20 contextual keyword families through a shared `fieldName` rule
in expression field positions while preserving their function, option,
and timestamp syntax. Update the visitor and regenerate the parser with
ANTLR 4.13.2.

Reject `LIKE`, `AND`, `OR`, `NOT`, and `IN` as field names in every
casing, and retain the existing case-insensitive `NULL` policy. Validate
struct-array parent names on both Create and Add paths, alongside child
names. Classify `ErrFieldInvalidName` (1701) as `InputError` at its
definition so ordinary names, reserved names, and RootCoord's
add-struct-field validator report the same classification. Remove the
redundant Proxy error markers and validate each struct parent name once
while preserving the existing validation order, codes, reasons,
identity, and non-retryability.

Compatibility: mixed-case names such as `And`, `In`, and `Like`
previously lexed as ordinary identifiers and could be created and
filtered. New Create/Add requests reject these names. Existing
collections are not revalidated, but backup restoration or cross-cluster
schema recreation containing these names will require renaming the
affected fields. This tightening is intentional; contextual keyword
field names remain supported.

Regression coverage includes contextual keywords and their dedicated
syntax, field identity/casing, SLL/LL parsing, core keyword rejection,
ordinary and struct-array Create/Add paths, reserved field names, and
InputError status/metric round trips. RootCoord's name validator now
also has classification and status round-trip coverage.

Validation:

- Current review follow-up: all tests in `pkg/util/merr`,
`pkg/util/requestutil`, and `pkg/common` passed with `-tags dynamic,test
-gcflags='all=-N -l' -count=1`; `git diff --check` passed.
- Current focused Proxy/RootCoord tests were blocked before execution by
older local native libraries missing required APIs. The development host
was inaccessible under the current network restrictions; native CI
validation is pending.
- Before this follow-up, the unchanged parser/rewriter implementation
passed 1,182 tests/subtests, focused Proxy regressions passed 248
tests/subtests with race detection and coverage, and
`merr`/`requestutil` guards passed 143 tests/subtests with race
detection and coverage.
- Generated parser output was reproduced with ANTLR 4.13.2.
- A previous full `make -o build-cpp-with-unittest test-go` attempt
timed out in `TestProxy/create_collection` while waiting for streaming
assignments and metadata-cache initialization. Later groups were not
reached; no fresh C++ build was performed.

issue: #53925

Fixes #53925

---------

Signed-off-by: xiaofanluan <[email protected]>
Co-authored-by: xiaofanluan <[email protected]>
2026-10-11 17:54:18 +08:00

6820 lines
152 KiB
Go

// Code generated from Plan.g4 by ANTLR 4.13.2. DO NOT EDIT.
package planparserv2 // Plan
import (
"fmt"
"strconv"
"sync"
"github.com/antlr4-go/antlr/v4"
)
// Suppress unused import errors
var _ = fmt.Printf
var _ = strconv.Itoa
var _ = sync.Once{}
type PlanParser struct {
*antlr.BaseParser
}
var PlanParserStaticData struct {
once sync.Once
serializedATN []int32
LiteralNames []string
SymbolicNames []string
RuleNames []string
PredictionContextCache *antlr.PredictionContextCache
atn *antlr.ATN
decisionToDFA []*antlr.DFA
}
func planParserInit() {
staticData := &PlanParserStaticData
staticData.LiteralNames = []string{
"", "'('", "')'", "'['", "','", "']'", "'{'", "'}'", "'<'", "'<='",
"'>'", "'>='", "'=='", "'!='", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "'=~'", "'!~'", "'='", "'+'", "'-'", "'*'", "'/'",
"'%'", "'**'", "'<<'", "'>>'", "'&'", "'|'", "'^'", "", "", "", "",
"'~'", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "'$meta'",
}
staticData.SymbolicNames = []string{
"", "", "", "", "", "", "LBRACE", "RBRACE", "LT", "LE", "GT", "GE",
"EQ", "NE", "LIKE", "EXISTS", "TEXTMATCH", "TEXTMATCHFUZZY", "PHRASEMATCH",
"RANDOMSAMPLE", "MATCH_ALL", "MATCH_ANY", "MATCH_LEAST", "MATCH_MOST",
"MATCH_EXACT", "INTERVAL", "ISO", "MINIMUM_SHOULD_MATCH", "THRESHOLD",
"REGEXMATCH", "REGEXNOTMATCH", "ASSIGN", "ADD", "SUB", "MUL", "DIV",
"MOD", "POW", "SHL", "SHR", "BAND", "BOR", "BXOR", "AND", "OR", "ISNULL",
"ISNOTNULL", "BNOT", "NOT", "IN", "EmptyArray", "JSONContains", "JSONContainsAll",
"JSONContainsAny", "ArrayContains", "ArrayContainsAll", "ArrayContainsAny",
"ArrayLength", "ElementFilter", "STEuqals", "STTouches", "STOverlaps",
"STCrosses", "STContains", "STIntersects", "STWithin", "STDWithin",
"STIsValid", "BooleanConstant", "IntegerConstant", "FloatingConstant",
"Identifier", "Meta", "StringLiteral", "RawStringLiteral", "JSONIdentifier",
"StructIndexFieldIdentifier", "StructFieldIdentifier", "StructSubFieldIdentifier",
"Whitespace", "Newline",
}
staticData.RuleNames = []string{
"expr", "fieldName", "fieldReference", "textMatchOption",
}
staticData.PredictionContextCache = antlr.NewPredictionContextCache()
staticData.serializedATN = []int32{
4, 1, 80, 309, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 1, 0, 1,
0, 1, 0, 1, 0, 1, 0, 3, 0, 14, 8, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 3, 0, 27, 8, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0, 3, 0, 36, 8, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 5, 0, 54, 8, 0, 10,
0, 12, 0, 57, 9, 0, 1, 0, 3, 0, 60, 8, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 3, 0, 74, 8, 0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 3, 0, 96, 8, 0, 1, 0, 1, 0, 1, 0, 1, 0,
1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 3, 0, 180, 8, 0, 1, 0, 1, 0, 1, 0,
1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
1, 0, 1, 0, 5, 0, 199, 8, 0, 10, 0, 12, 0, 202, 9, 0, 1, 0, 3, 0, 205,
8, 0, 3, 0, 207, 8, 0, 1, 0, 1, 0, 1, 0, 3, 0, 212, 8, 0, 1, 0, 1, 0, 1,
0, 3, 0, 217, 8, 0, 1, 0, 3, 0, 220, 8, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 3, 0, 245, 8, 0, 1, 0, 1, 0, 1, 0,
1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 3, 0, 255, 8, 0, 1, 0, 1, 0, 1, 0, 1, 0,
1, 0, 1, 0, 1, 0, 1, 0, 3, 0, 265, 8, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 5, 0, 290, 8, 0, 10, 0, 12, 0, 293,
9, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 303, 8, 2,
1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 0, 1, 0, 4, 0, 2, 4, 6, 0, 16, 1, 0, 32,
33, 1, 0, 8, 13, 1, 0, 20, 21, 1, 0, 22, 24, 2, 0, 32, 33, 47, 48, 2, 0,
51, 51, 54, 54, 2, 0, 52, 52, 55, 55, 2, 0, 53, 53, 56, 56, 1, 0, 59, 65,
1, 0, 34, 36, 1, 0, 38, 39, 1, 0, 8, 9, 1, 0, 10, 11, 1, 0, 8, 11, 1, 0,
12, 13, 4, 0, 17, 17, 20, 28, 58, 67, 71, 71, 383, 0, 219, 1, 0, 0, 0,
2, 294, 1, 0, 0, 0, 4, 302, 1, 0, 0, 0, 6, 304, 1, 0, 0, 0, 8, 9, 6, 0,
-1, 0, 9, 13, 3, 2, 1, 0, 10, 11, 7, 0, 0, 0, 11, 12, 5, 25, 0, 0, 12,
14, 5, 73, 0, 0, 13, 10, 1, 0, 0, 0, 13, 14, 1, 0, 0, 0, 14, 15, 1, 0,
0, 0, 15, 16, 7, 1, 0, 0, 16, 17, 5, 26, 0, 0, 17, 18, 5, 73, 0, 0, 18,
220, 1, 0, 0, 0, 19, 20, 5, 26, 0, 0, 20, 21, 5, 73, 0, 0, 21, 22, 7, 1,
0, 0, 22, 26, 3, 2, 1, 0, 23, 24, 7, 0, 0, 0, 24, 25, 5, 25, 0, 0, 25,
27, 5, 73, 0, 0, 26, 23, 1, 0, 0, 0, 26, 27, 1, 0, 0, 0, 27, 220, 1, 0,
0, 0, 28, 220, 5, 69, 0, 0, 29, 220, 5, 70, 0, 0, 30, 220, 5, 68, 0, 0,
31, 220, 5, 73, 0, 0, 32, 220, 5, 74, 0, 0, 33, 36, 3, 2, 1, 0, 34, 36,
5, 72, 0, 0, 35, 33, 1, 0, 0, 0, 35, 34, 1, 0, 0, 0, 36, 220, 1, 0, 0,
0, 37, 220, 5, 75, 0, 0, 38, 220, 5, 77, 0, 0, 39, 220, 5, 76, 0, 0, 40,
220, 5, 78, 0, 0, 41, 42, 5, 6, 0, 0, 42, 43, 3, 2, 1, 0, 43, 44, 5, 7,
0, 0, 44, 220, 1, 0, 0, 0, 45, 46, 5, 1, 0, 0, 46, 47, 3, 0, 0, 0, 47,
48, 5, 2, 0, 0, 48, 220, 1, 0, 0, 0, 49, 50, 5, 3, 0, 0, 50, 55, 3, 0,
0, 0, 51, 52, 5, 4, 0, 0, 52, 54, 3, 0, 0, 0, 53, 51, 1, 0, 0, 0, 54, 57,
1, 0, 0, 0, 55, 53, 1, 0, 0, 0, 55, 56, 1, 0, 0, 0, 56, 59, 1, 0, 0, 0,
57, 55, 1, 0, 0, 0, 58, 60, 5, 4, 0, 0, 59, 58, 1, 0, 0, 0, 59, 60, 1,
0, 0, 0, 60, 61, 1, 0, 0, 0, 61, 62, 5, 5, 0, 0, 62, 220, 1, 0, 0, 0, 63,
220, 5, 50, 0, 0, 64, 65, 5, 15, 0, 0, 65, 220, 3, 0, 0, 37, 66, 67, 5,
16, 0, 0, 67, 68, 5, 1, 0, 0, 68, 69, 3, 2, 1, 0, 69, 70, 5, 4, 0, 0, 70,
73, 3, 0, 0, 0, 71, 72, 5, 4, 0, 0, 72, 74, 3, 6, 3, 0, 73, 71, 1, 0, 0,
0, 73, 74, 1, 0, 0, 0, 74, 75, 1, 0, 0, 0, 75, 76, 5, 2, 0, 0, 76, 220,
1, 0, 0, 0, 77, 78, 5, 17, 0, 0, 78, 79, 5, 1, 0, 0, 79, 80, 3, 2, 1, 0,
80, 81, 5, 4, 0, 0, 81, 82, 3, 0, 0, 0, 82, 83, 5, 4, 0, 0, 83, 84, 5,
71, 0, 0, 84, 85, 5, 31, 0, 0, 85, 86, 5, 69, 0, 0, 86, 87, 5, 2, 0, 0,
87, 220, 1, 0, 0, 0, 88, 89, 5, 18, 0, 0, 89, 90, 5, 1, 0, 0, 90, 91, 3,
2, 1, 0, 91, 92, 5, 4, 0, 0, 92, 95, 3, 0, 0, 0, 93, 94, 5, 4, 0, 0, 94,
96, 3, 0, 0, 0, 95, 93, 1, 0, 0, 0, 95, 96, 1, 0, 0, 0, 96, 97, 1, 0, 0,
0, 97, 98, 5, 2, 0, 0, 98, 220, 1, 0, 0, 0, 99, 100, 5, 19, 0, 0, 100,
101, 5, 1, 0, 0, 101, 102, 3, 0, 0, 0, 102, 103, 5, 2, 0, 0, 103, 220,
1, 0, 0, 0, 104, 105, 5, 58, 0, 0, 105, 106, 5, 1, 0, 0, 106, 107, 3, 2,
1, 0, 107, 108, 5, 4, 0, 0, 108, 109, 3, 0, 0, 0, 109, 110, 5, 2, 0, 0,
110, 220, 1, 0, 0, 0, 111, 112, 7, 2, 0, 0, 112, 113, 5, 1, 0, 0, 113,
114, 3, 2, 1, 0, 114, 115, 5, 4, 0, 0, 115, 116, 3, 0, 0, 0, 116, 117,
5, 2, 0, 0, 117, 220, 1, 0, 0, 0, 118, 119, 7, 3, 0, 0, 119, 120, 5, 1,
0, 0, 120, 121, 3, 2, 1, 0, 121, 122, 5, 4, 0, 0, 122, 123, 3, 0, 0, 0,
123, 124, 5, 4, 0, 0, 124, 125, 5, 28, 0, 0, 125, 126, 5, 31, 0, 0, 126,
127, 5, 69, 0, 0, 127, 128, 5, 2, 0, 0, 128, 220, 1, 0, 0, 0, 129, 130,
7, 4, 0, 0, 130, 220, 3, 0, 0, 25, 131, 132, 7, 5, 0, 0, 132, 133, 5, 1,
0, 0, 133, 134, 3, 0, 0, 0, 134, 135, 5, 4, 0, 0, 135, 136, 3, 0, 0, 0,
136, 137, 5, 2, 0, 0, 137, 220, 1, 0, 0, 0, 138, 139, 7, 6, 0, 0, 139,
140, 5, 1, 0, 0, 140, 141, 3, 0, 0, 0, 141, 142, 5, 4, 0, 0, 142, 143,
3, 0, 0, 0, 143, 144, 5, 2, 0, 0, 144, 220, 1, 0, 0, 0, 145, 146, 7, 7,
0, 0, 146, 147, 5, 1, 0, 0, 147, 148, 3, 0, 0, 0, 148, 149, 5, 4, 0, 0,
149, 150, 3, 0, 0, 0, 150, 151, 5, 2, 0, 0, 151, 220, 1, 0, 0, 0, 152,
153, 7, 8, 0, 0, 153, 154, 5, 1, 0, 0, 154, 155, 3, 2, 1, 0, 155, 156,
5, 4, 0, 0, 156, 157, 3, 0, 0, 0, 157, 158, 5, 2, 0, 0, 158, 220, 1, 0,
0, 0, 159, 160, 5, 66, 0, 0, 160, 161, 5, 1, 0, 0, 161, 162, 3, 2, 1, 0,
162, 163, 5, 4, 0, 0, 163, 164, 3, 0, 0, 0, 164, 165, 5, 4, 0, 0, 165,
166, 3, 0, 0, 0, 166, 167, 5, 2, 0, 0, 167, 220, 1, 0, 0, 0, 168, 169,
5, 67, 0, 0, 169, 170, 5, 1, 0, 0, 170, 171, 3, 2, 1, 0, 171, 172, 5, 2,
0, 0, 172, 220, 1, 0, 0, 0, 173, 174, 5, 57, 0, 0, 174, 179, 5, 1, 0, 0,
175, 180, 3, 2, 1, 0, 176, 180, 5, 75, 0, 0, 177, 180, 5, 77, 0, 0, 178,
180, 5, 78, 0, 0, 179, 175, 1, 0, 0, 0, 179, 176, 1, 0, 0, 0, 179, 177,
1, 0, 0, 0, 179, 178, 1, 0, 0, 0, 180, 181, 1, 0, 0, 0, 181, 220, 5, 2,
0, 0, 182, 183, 5, 71, 0, 0, 183, 184, 5, 1, 0, 0, 184, 185, 3, 4, 2, 0,
185, 186, 5, 4, 0, 0, 186, 187, 3, 0, 0, 0, 187, 188, 5, 4, 0, 0, 188,
189, 5, 71, 0, 0, 189, 190, 5, 31, 0, 0, 190, 191, 5, 71, 0, 0, 191, 192,
5, 2, 0, 0, 192, 220, 1, 0, 0, 0, 193, 194, 5, 71, 0, 0, 194, 206, 5, 1,
0, 0, 195, 200, 3, 0, 0, 0, 196, 197, 5, 4, 0, 0, 197, 199, 3, 0, 0, 0,
198, 196, 1, 0, 0, 0, 199, 202, 1, 0, 0, 0, 200, 198, 1, 0, 0, 0, 200,
201, 1, 0, 0, 0, 201, 204, 1, 0, 0, 0, 202, 200, 1, 0, 0, 0, 203, 205,
5, 4, 0, 0, 204, 203, 1, 0, 0, 0, 204, 205, 1, 0, 0, 0, 205, 207, 1, 0,
0, 0, 206, 195, 1, 0, 0, 0, 206, 207, 1, 0, 0, 0, 207, 208, 1, 0, 0, 0,
208, 220, 5, 2, 0, 0, 209, 212, 3, 2, 1, 0, 210, 212, 5, 75, 0, 0, 211,
209, 1, 0, 0, 0, 211, 210, 1, 0, 0, 0, 212, 213, 1, 0, 0, 0, 213, 220,
5, 45, 0, 0, 214, 217, 3, 2, 1, 0, 215, 217, 5, 75, 0, 0, 216, 214, 1,
0, 0, 0, 216, 215, 1, 0, 0, 0, 217, 218, 1, 0, 0, 0, 218, 220, 5, 46, 0,
0, 219, 8, 1, 0, 0, 0, 219, 19, 1, 0, 0, 0, 219, 28, 1, 0, 0, 0, 219, 29,
1, 0, 0, 0, 219, 30, 1, 0, 0, 0, 219, 31, 1, 0, 0, 0, 219, 32, 1, 0, 0,
0, 219, 35, 1, 0, 0, 0, 219, 37, 1, 0, 0, 0, 219, 38, 1, 0, 0, 0, 219,
39, 1, 0, 0, 0, 219, 40, 1, 0, 0, 0, 219, 41, 1, 0, 0, 0, 219, 45, 1, 0,
0, 0, 219, 49, 1, 0, 0, 0, 219, 63, 1, 0, 0, 0, 219, 64, 1, 0, 0, 0, 219,
66, 1, 0, 0, 0, 219, 77, 1, 0, 0, 0, 219, 88, 1, 0, 0, 0, 219, 99, 1, 0,
0, 0, 219, 104, 1, 0, 0, 0, 219, 111, 1, 0, 0, 0, 219, 118, 1, 0, 0, 0,
219, 129, 1, 0, 0, 0, 219, 131, 1, 0, 0, 0, 219, 138, 1, 0, 0, 0, 219,
145, 1, 0, 0, 0, 219, 152, 1, 0, 0, 0, 219, 159, 1, 0, 0, 0, 219, 168,
1, 0, 0, 0, 219, 173, 1, 0, 0, 0, 219, 182, 1, 0, 0, 0, 219, 193, 1, 0,
0, 0, 219, 211, 1, 0, 0, 0, 219, 216, 1, 0, 0, 0, 220, 291, 1, 0, 0, 0,
221, 222, 10, 36, 0, 0, 222, 223, 5, 14, 0, 0, 223, 290, 3, 0, 0, 37, 224,
225, 10, 35, 0, 0, 225, 226, 5, 29, 0, 0, 226, 290, 3, 0, 0, 36, 227, 228,
10, 34, 0, 0, 228, 229, 5, 30, 0, 0, 229, 290, 3, 0, 0, 35, 230, 231, 10,
26, 0, 0, 231, 232, 5, 37, 0, 0, 232, 290, 3, 0, 0, 27, 233, 234, 10, 24,
0, 0, 234, 235, 7, 9, 0, 0, 235, 290, 3, 0, 0, 25, 236, 237, 10, 23, 0,
0, 237, 238, 7, 0, 0, 0, 238, 290, 3, 0, 0, 24, 239, 240, 10, 22, 0, 0,
240, 241, 7, 10, 0, 0, 241, 290, 3, 0, 0, 23, 242, 244, 10, 21, 0, 0, 243,
245, 5, 48, 0, 0, 244, 243, 1, 0, 0, 0, 244, 245, 1, 0, 0, 0, 245, 246,
1, 0, 0, 0, 246, 247, 5, 49, 0, 0, 247, 290, 3, 0, 0, 22, 248, 249, 10,
11, 0, 0, 249, 254, 7, 11, 0, 0, 250, 255, 3, 2, 1, 0, 251, 255, 5, 75,
0, 0, 252, 255, 5, 78, 0, 0, 253, 255, 5, 76, 0, 0, 254, 250, 1, 0, 0,
0, 254, 251, 1, 0, 0, 0, 254, 252, 1, 0, 0, 0, 254, 253, 1, 0, 0, 0, 255,
256, 1, 0, 0, 0, 256, 257, 7, 11, 0, 0, 257, 290, 3, 0, 0, 12, 258, 259,
10, 10, 0, 0, 259, 264, 7, 12, 0, 0, 260, 265, 3, 2, 1, 0, 261, 265, 5,
75, 0, 0, 262, 265, 5, 78, 0, 0, 263, 265, 5, 76, 0, 0, 264, 260, 1, 0,
0, 0, 264, 261, 1, 0, 0, 0, 264, 262, 1, 0, 0, 0, 264, 263, 1, 0, 0, 0,
265, 266, 1, 0, 0, 0, 266, 267, 7, 12, 0, 0, 267, 290, 3, 0, 0, 11, 268,
269, 10, 9, 0, 0, 269, 270, 7, 13, 0, 0, 270, 290, 3, 0, 0, 10, 271, 272,
10, 8, 0, 0, 272, 273, 7, 14, 0, 0, 273, 290, 3, 0, 0, 9, 274, 275, 10,
7, 0, 0, 275, 276, 5, 40, 0, 0, 276, 290, 3, 0, 0, 8, 277, 278, 10, 6,
0, 0, 278, 279, 5, 42, 0, 0, 279, 290, 3, 0, 0, 7, 280, 281, 10, 5, 0,
0, 281, 282, 5, 41, 0, 0, 282, 290, 3, 0, 0, 6, 283, 284, 10, 4, 0, 0,
284, 285, 5, 43, 0, 0, 285, 290, 3, 0, 0, 5, 286, 287, 10, 3, 0, 0, 287,
288, 5, 44, 0, 0, 288, 290, 3, 0, 0, 4, 289, 221, 1, 0, 0, 0, 289, 224,
1, 0, 0, 0, 289, 227, 1, 0, 0, 0, 289, 230, 1, 0, 0, 0, 289, 233, 1, 0,
0, 0, 289, 236, 1, 0, 0, 0, 289, 239, 1, 0, 0, 0, 289, 242, 1, 0, 0, 0,
289, 248, 1, 0, 0, 0, 289, 258, 1, 0, 0, 0, 289, 268, 1, 0, 0, 0, 289,
271, 1, 0, 0, 0, 289, 274, 1, 0, 0, 0, 289, 277, 1, 0, 0, 0, 289, 280,
1, 0, 0, 0, 289, 283, 1, 0, 0, 0, 289, 286, 1, 0, 0, 0, 290, 293, 1, 0,
0, 0, 291, 289, 1, 0, 0, 0, 291, 292, 1, 0, 0, 0, 292, 1, 1, 0, 0, 0, 293,
291, 1, 0, 0, 0, 294, 295, 7, 15, 0, 0, 295, 3, 1, 0, 0, 0, 296, 303, 3,
2, 1, 0, 297, 303, 5, 72, 0, 0, 298, 303, 5, 75, 0, 0, 299, 303, 5, 77,
0, 0, 300, 303, 5, 76, 0, 0, 301, 303, 5, 78, 0, 0, 302, 296, 1, 0, 0,
0, 302, 297, 1, 0, 0, 0, 302, 298, 1, 0, 0, 0, 302, 299, 1, 0, 0, 0, 302,
300, 1, 0, 0, 0, 302, 301, 1, 0, 0, 0, 303, 5, 1, 0, 0, 0, 304, 305, 5,
27, 0, 0, 305, 306, 5, 31, 0, 0, 306, 307, 5, 69, 0, 0, 307, 7, 1, 0, 0,
0, 20, 13, 26, 35, 55, 59, 73, 95, 179, 200, 204, 206, 211, 216, 219, 244,
254, 264, 289, 291, 302,
}
deserializer := antlr.NewATNDeserializer(nil)
staticData.atn = deserializer.Deserialize(staticData.serializedATN)
atn := staticData.atn
staticData.decisionToDFA = make([]*antlr.DFA, len(atn.DecisionToState))
decisionToDFA := staticData.decisionToDFA
for index, state := range atn.DecisionToState {
decisionToDFA[index] = antlr.NewDFA(state, index)
}
}
// PlanParserInit initializes any static state used to implement PlanParser. By default the
// static state used to implement the parser is lazily initialized during the first call to
// NewPlanParser(). You can call this function if you wish to initialize the static state ahead
// of time.
func PlanParserInit() {
staticData := &PlanParserStaticData
staticData.once.Do(planParserInit)
}
// NewPlanParser produces a new parser instance for the optional input antlr.TokenStream.
func NewPlanParser(input antlr.TokenStream) *PlanParser {
PlanParserInit()
this := new(PlanParser)
this.BaseParser = antlr.NewBaseParser(input)
staticData := &PlanParserStaticData
this.Interpreter = antlr.NewParserATNSimulator(this, staticData.atn, staticData.decisionToDFA, staticData.PredictionContextCache)
this.RuleNames = staticData.RuleNames
this.LiteralNames = staticData.LiteralNames
this.SymbolicNames = staticData.SymbolicNames
this.GrammarFileName = "Plan.g4"
return this
}
// PlanParser tokens.
const (
PlanParserEOF = antlr.TokenEOF
PlanParserT__0 = 1
PlanParserT__1 = 2
PlanParserT__2 = 3
PlanParserT__3 = 4
PlanParserT__4 = 5
PlanParserLBRACE = 6
PlanParserRBRACE = 7
PlanParserLT = 8
PlanParserLE = 9
PlanParserGT = 10
PlanParserGE = 11
PlanParserEQ = 12
PlanParserNE = 13
PlanParserLIKE = 14
PlanParserEXISTS = 15
PlanParserTEXTMATCH = 16
PlanParserTEXTMATCHFUZZY = 17
PlanParserPHRASEMATCH = 18
PlanParserRANDOMSAMPLE = 19
PlanParserMATCH_ALL = 20
PlanParserMATCH_ANY = 21
PlanParserMATCH_LEAST = 22
PlanParserMATCH_MOST = 23
PlanParserMATCH_EXACT = 24
PlanParserINTERVAL = 25
PlanParserISO = 26
PlanParserMINIMUM_SHOULD_MATCH = 27
PlanParserTHRESHOLD = 28
PlanParserREGEXMATCH = 29
PlanParserREGEXNOTMATCH = 30
PlanParserASSIGN = 31
PlanParserADD = 32
PlanParserSUB = 33
PlanParserMUL = 34
PlanParserDIV = 35
PlanParserMOD = 36
PlanParserPOW = 37
PlanParserSHL = 38
PlanParserSHR = 39
PlanParserBAND = 40
PlanParserBOR = 41
PlanParserBXOR = 42
PlanParserAND = 43
PlanParserOR = 44
PlanParserISNULL = 45
PlanParserISNOTNULL = 46
PlanParserBNOT = 47
PlanParserNOT = 48
PlanParserIN = 49
PlanParserEmptyArray = 50
PlanParserJSONContains = 51
PlanParserJSONContainsAll = 52
PlanParserJSONContainsAny = 53
PlanParserArrayContains = 54
PlanParserArrayContainsAll = 55
PlanParserArrayContainsAny = 56
PlanParserArrayLength = 57
PlanParserElementFilter = 58
PlanParserSTEuqals = 59
PlanParserSTTouches = 60
PlanParserSTOverlaps = 61
PlanParserSTCrosses = 62
PlanParserSTContains = 63
PlanParserSTIntersects = 64
PlanParserSTWithin = 65
PlanParserSTDWithin = 66
PlanParserSTIsValid = 67
PlanParserBooleanConstant = 68
PlanParserIntegerConstant = 69
PlanParserFloatingConstant = 70
PlanParserIdentifier = 71
PlanParserMeta = 72
PlanParserStringLiteral = 73
PlanParserRawStringLiteral = 74
PlanParserJSONIdentifier = 75
PlanParserStructIndexFieldIdentifier = 76
PlanParserStructFieldIdentifier = 77
PlanParserStructSubFieldIdentifier = 78
PlanParserWhitespace = 79
PlanParserNewline = 80
)
// PlanParser rules.
const (
PlanParserRULE_expr = 0
PlanParserRULE_fieldName = 1
PlanParserRULE_fieldReference = 2
PlanParserRULE_textMatchOption = 3
)
// IExprContext is an interface to support dynamic dispatch.
type IExprContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// IsExprContext differentiates from other interfaces.
IsExprContext()
}
type ExprContext struct {
antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyExprContext() *ExprContext {
var p = new(ExprContext)
antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
p.RuleIndex = PlanParserRULE_expr
return p
}
func InitEmptyExprContext(p *ExprContext) {
antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
p.RuleIndex = PlanParserRULE_expr
}
func (*ExprContext) IsExprContext() {}
func NewExprContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ExprContext {
var p = new(ExprContext)
antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)
p.parser = parser
p.RuleIndex = PlanParserRULE_expr
return p
}
func (s *ExprContext) GetParser() antlr.Parser { return s.parser }
func (s *ExprContext) CopyAll(ctx *ExprContext) {
s.CopyFrom(&ctx.BaseParserRuleContext)
}
func (s *ExprContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *ExprContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
type StringContext struct {
ExprContext
}
func NewStringContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *StringContext {
var p = new(StringContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *StringContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *StringContext) StringLiteral() antlr.TerminalNode {
return s.GetToken(PlanParserStringLiteral, 0)
}
func (s *StringContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitString(s)
default:
return t.VisitChildren(s)
}
}
type FloatingContext struct {
ExprContext
}
func NewFloatingContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *FloatingContext {
var p = new(FloatingContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *FloatingContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *FloatingContext) FloatingConstant() antlr.TerminalNode {
return s.GetToken(PlanParserFloatingConstant, 0)
}
func (s *FloatingContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitFloating(s)
default:
return t.VisitChildren(s)
}
}
type TextMatchFuzzyContext struct {
ExprContext
}
func NewTextMatchFuzzyContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *TextMatchFuzzyContext {
var p = new(TextMatchFuzzyContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *TextMatchFuzzyContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *TextMatchFuzzyContext) TEXTMATCHFUZZY() antlr.TerminalNode {
return s.GetToken(PlanParserTEXTMATCHFUZZY, 0)
}
func (s *TextMatchFuzzyContext) FieldName() IFieldNameContext {
var t antlr.RuleContext
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IFieldNameContext); ok {
t = ctx.(antlr.RuleContext)
break
}
}
if t == nil {
return nil
}
return t.(IFieldNameContext)
}
func (s *TextMatchFuzzyContext) Expr() IExprContext {
var t antlr.RuleContext
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IExprContext); ok {
t = ctx.(antlr.RuleContext)
break
}
}
if t == nil {
return nil
}
return t.(IExprContext)
}
func (s *TextMatchFuzzyContext) Identifier() antlr.TerminalNode {
return s.GetToken(PlanParserIdentifier, 0)
}
func (s *TextMatchFuzzyContext) ASSIGN() antlr.TerminalNode {
return s.GetToken(PlanParserASSIGN, 0)
}
func (s *TextMatchFuzzyContext) IntegerConstant() antlr.TerminalNode {
return s.GetToken(PlanParserIntegerConstant, 0)
}
func (s *TextMatchFuzzyContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitTextMatchFuzzy(s)
default:
return t.VisitChildren(s)
}
}
type IsNotNullContext struct {
ExprContext
}
func NewIsNotNullContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *IsNotNullContext {
var p = new(IsNotNullContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *IsNotNullContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *IsNotNullContext) ISNOTNULL() antlr.TerminalNode {
return s.GetToken(PlanParserISNOTNULL, 0)
}
func (s *IsNotNullContext) FieldName() IFieldNameContext {
var t antlr.RuleContext
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IFieldNameContext); ok {
t = ctx.(antlr.RuleContext)
break
}
}
if t == nil {
return nil
}
return t.(IFieldNameContext)
}
func (s *IsNotNullContext) JSONIdentifier() antlr.TerminalNode {
return s.GetToken(PlanParserJSONIdentifier, 0)
}
func (s *IsNotNullContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitIsNotNull(s)
default:
return t.VisitChildren(s)
}
}
type IdentifierContext struct {
ExprContext
}
func NewIdentifierContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *IdentifierContext {
var p = new(IdentifierContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *IdentifierContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *IdentifierContext) FieldName() IFieldNameContext {
var t antlr.RuleContext
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IFieldNameContext); ok {
t = ctx.(antlr.RuleContext)
break
}
}
if t == nil {
return nil
}
return t.(IFieldNameContext)
}
func (s *IdentifierContext) Meta() antlr.TerminalNode {
return s.GetToken(PlanParserMeta, 0)
}
func (s *IdentifierContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitIdentifier(s)
default:
return t.VisitChildren(s)
}
}
type LikeContext struct {
ExprContext
}
func NewLikeContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *LikeContext {
var p = new(LikeContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *LikeContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *LikeContext) AllExpr() []IExprContext {
children := s.GetChildren()
len := 0
for _, ctx := range children {
if _, ok := ctx.(IExprContext); ok {
len++
}
}
tst := make([]IExprContext, len)
i := 0
for _, ctx := range children {
if t, ok := ctx.(IExprContext); ok {
tst[i] = t.(IExprContext)
i++
}
}
return tst
}
func (s *LikeContext) Expr(i int) IExprContext {
var t antlr.RuleContext
j := 0
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IExprContext); ok {
if j == i {
t = ctx.(antlr.RuleContext)
break
}
j++
}
}
if t == nil {
return nil
}
return t.(IExprContext)
}
func (s *LikeContext) LIKE() antlr.TerminalNode {
return s.GetToken(PlanParserLIKE, 0)
}
func (s *LikeContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitLike(s)
default:
return t.VisitChildren(s)
}
}
type RegexNotMatchContext struct {
ExprContext
}
func NewRegexNotMatchContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *RegexNotMatchContext {
var p = new(RegexNotMatchContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *RegexNotMatchContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *RegexNotMatchContext) AllExpr() []IExprContext {
children := s.GetChildren()
len := 0
for _, ctx := range children {
if _, ok := ctx.(IExprContext); ok {
len++
}
}
tst := make([]IExprContext, len)
i := 0
for _, ctx := range children {
if t, ok := ctx.(IExprContext); ok {
tst[i] = t.(IExprContext)
i++
}
}
return tst
}
func (s *RegexNotMatchContext) Expr(i int) IExprContext {
var t antlr.RuleContext
j := 0
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IExprContext); ok {
if j == i {
t = ctx.(antlr.RuleContext)
break
}
j++
}
}
if t == nil {
return nil
}
return t.(IExprContext)
}
func (s *RegexNotMatchContext) REGEXNOTMATCH() antlr.TerminalNode {
return s.GetToken(PlanParserREGEXNOTMATCH, 0)
}
func (s *RegexNotMatchContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitRegexNotMatch(s)
default:
return t.VisitChildren(s)
}
}
type EqualityContext struct {
ExprContext
op antlr.Token
}
func NewEqualityContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *EqualityContext {
var p = new(EqualityContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *EqualityContext) GetOp() antlr.Token { return s.op }
func (s *EqualityContext) SetOp(v antlr.Token) { s.op = v }
func (s *EqualityContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *EqualityContext) AllExpr() []IExprContext {
children := s.GetChildren()
len := 0
for _, ctx := range children {
if _, ok := ctx.(IExprContext); ok {
len++
}
}
tst := make([]IExprContext, len)
i := 0
for _, ctx := range children {
if t, ok := ctx.(IExprContext); ok {
tst[i] = t.(IExprContext)
i++
}
}
return tst
}
func (s *EqualityContext) Expr(i int) IExprContext {
var t antlr.RuleContext
j := 0
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IExprContext); ok {
if j == i {
t = ctx.(antlr.RuleContext)
break
}
j++
}
}
if t == nil {
return nil
}
return t.(IExprContext)
}
func (s *EqualityContext) EQ() antlr.TerminalNode {
return s.GetToken(PlanParserEQ, 0)
}
func (s *EqualityContext) NE() antlr.TerminalNode {
return s.GetToken(PlanParserNE, 0)
}
func (s *EqualityContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitEquality(s)
default:
return t.VisitChildren(s)
}
}
type BooleanContext struct {
ExprContext
}
func NewBooleanContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *BooleanContext {
var p = new(BooleanContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *BooleanContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *BooleanContext) BooleanConstant() antlr.TerminalNode {
return s.GetToken(PlanParserBooleanConstant, 0)
}
func (s *BooleanContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitBoolean(s)
default:
return t.VisitChildren(s)
}
}
type ShiftContext struct {
ExprContext
op antlr.Token
}
func NewShiftContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ShiftContext {
var p = new(ShiftContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *ShiftContext) GetOp() antlr.Token { return s.op }
func (s *ShiftContext) SetOp(v antlr.Token) { s.op = v }
func (s *ShiftContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *ShiftContext) AllExpr() []IExprContext {
children := s.GetChildren()
len := 0
for _, ctx := range children {
if _, ok := ctx.(IExprContext); ok {
len++
}
}
tst := make([]IExprContext, len)
i := 0
for _, ctx := range children {
if t, ok := ctx.(IExprContext); ok {
tst[i] = t.(IExprContext)
i++
}
}
return tst
}
func (s *ShiftContext) Expr(i int) IExprContext {
var t antlr.RuleContext
j := 0
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IExprContext); ok {
if j == i {
t = ctx.(antlr.RuleContext)
break
}
j++
}
}
if t == nil {
return nil
}
return t.(IExprContext)
}
func (s *ShiftContext) SHL() antlr.TerminalNode {
return s.GetToken(PlanParserSHL, 0)
}
func (s *ShiftContext) SHR() antlr.TerminalNode {
return s.GetToken(PlanParserSHR, 0)
}
func (s *ShiftContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitShift(s)
default:
return t.VisitChildren(s)
}
}
type TimestamptzCompareForwardContext struct {
ExprContext
op1 antlr.Token
interval_string antlr.Token
op2 antlr.Token
compare_string antlr.Token
}
func NewTimestamptzCompareForwardContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *TimestamptzCompareForwardContext {
var p = new(TimestamptzCompareForwardContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *TimestamptzCompareForwardContext) GetOp1() antlr.Token { return s.op1 }
func (s *TimestamptzCompareForwardContext) GetInterval_string() antlr.Token { return s.interval_string }
func (s *TimestamptzCompareForwardContext) GetOp2() antlr.Token { return s.op2 }
func (s *TimestamptzCompareForwardContext) GetCompare_string() antlr.Token { return s.compare_string }
func (s *TimestamptzCompareForwardContext) SetOp1(v antlr.Token) { s.op1 = v }
func (s *TimestamptzCompareForwardContext) SetInterval_string(v antlr.Token) { s.interval_string = v }
func (s *TimestamptzCompareForwardContext) SetOp2(v antlr.Token) { s.op2 = v }
func (s *TimestamptzCompareForwardContext) SetCompare_string(v antlr.Token) { s.compare_string = v }
func (s *TimestamptzCompareForwardContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *TimestamptzCompareForwardContext) FieldName() IFieldNameContext {
var t antlr.RuleContext
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IFieldNameContext); ok {
t = ctx.(antlr.RuleContext)
break
}
}
if t == nil {
return nil
}
return t.(IFieldNameContext)
}
func (s *TimestamptzCompareForwardContext) ISO() antlr.TerminalNode {
return s.GetToken(PlanParserISO, 0)
}
func (s *TimestamptzCompareForwardContext) AllStringLiteral() []antlr.TerminalNode {
return s.GetTokens(PlanParserStringLiteral)
}
func (s *TimestamptzCompareForwardContext) StringLiteral(i int) antlr.TerminalNode {
return s.GetToken(PlanParserStringLiteral, i)
}
func (s *TimestamptzCompareForwardContext) LT() antlr.TerminalNode {
return s.GetToken(PlanParserLT, 0)
}
func (s *TimestamptzCompareForwardContext) LE() antlr.TerminalNode {
return s.GetToken(PlanParserLE, 0)
}
func (s *TimestamptzCompareForwardContext) GT() antlr.TerminalNode {
return s.GetToken(PlanParserGT, 0)
}
func (s *TimestamptzCompareForwardContext) GE() antlr.TerminalNode {
return s.GetToken(PlanParserGE, 0)
}
func (s *TimestamptzCompareForwardContext) EQ() antlr.TerminalNode {
return s.GetToken(PlanParserEQ, 0)
}
func (s *TimestamptzCompareForwardContext) NE() antlr.TerminalNode {
return s.GetToken(PlanParserNE, 0)
}
func (s *TimestamptzCompareForwardContext) INTERVAL() antlr.TerminalNode {
return s.GetToken(PlanParserINTERVAL, 0)
}
func (s *TimestamptzCompareForwardContext) ADD() antlr.TerminalNode {
return s.GetToken(PlanParserADD, 0)
}
func (s *TimestamptzCompareForwardContext) SUB() antlr.TerminalNode {
return s.GetToken(PlanParserSUB, 0)
}
func (s *TimestamptzCompareForwardContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitTimestamptzCompareForward(s)
default:
return t.VisitChildren(s)
}
}
type ReverseRangeContext struct {
ExprContext
op1 antlr.Token
op2 antlr.Token
}
func NewReverseRangeContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ReverseRangeContext {
var p = new(ReverseRangeContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *ReverseRangeContext) GetOp1() antlr.Token { return s.op1 }
func (s *ReverseRangeContext) GetOp2() antlr.Token { return s.op2 }
func (s *ReverseRangeContext) SetOp1(v antlr.Token) { s.op1 = v }
func (s *ReverseRangeContext) SetOp2(v antlr.Token) { s.op2 = v }
func (s *ReverseRangeContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *ReverseRangeContext) AllExpr() []IExprContext {
children := s.GetChildren()
len := 0
for _, ctx := range children {
if _, ok := ctx.(IExprContext); ok {
len++
}
}
tst := make([]IExprContext, len)
i := 0
for _, ctx := range children {
if t, ok := ctx.(IExprContext); ok {
tst[i] = t.(IExprContext)
i++
}
}
return tst
}
func (s *ReverseRangeContext) Expr(i int) IExprContext {
var t antlr.RuleContext
j := 0
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IExprContext); ok {
if j == i {
t = ctx.(antlr.RuleContext)
break
}
j++
}
}
if t == nil {
return nil
}
return t.(IExprContext)
}
func (s *ReverseRangeContext) AllGT() []antlr.TerminalNode {
return s.GetTokens(PlanParserGT)
}
func (s *ReverseRangeContext) GT(i int) antlr.TerminalNode {
return s.GetToken(PlanParserGT, i)
}
func (s *ReverseRangeContext) AllGE() []antlr.TerminalNode {
return s.GetTokens(PlanParserGE)
}
func (s *ReverseRangeContext) GE(i int) antlr.TerminalNode {
return s.GetToken(PlanParserGE, i)
}
func (s *ReverseRangeContext) FieldName() IFieldNameContext {
var t antlr.RuleContext
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IFieldNameContext); ok {
t = ctx.(antlr.RuleContext)
break
}
}
if t == nil {
return nil
}
return t.(IFieldNameContext)
}
func (s *ReverseRangeContext) JSONIdentifier() antlr.TerminalNode {
return s.GetToken(PlanParserJSONIdentifier, 0)
}
func (s *ReverseRangeContext) StructSubFieldIdentifier() antlr.TerminalNode {
return s.GetToken(PlanParserStructSubFieldIdentifier, 0)
}
func (s *ReverseRangeContext) StructIndexFieldIdentifier() antlr.TerminalNode {
return s.GetToken(PlanParserStructIndexFieldIdentifier, 0)
}
func (s *ReverseRangeContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitReverseRange(s)
default:
return t.VisitChildren(s)
}
}
type EmptyArrayContext struct {
ExprContext
}
func NewEmptyArrayContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *EmptyArrayContext {
var p = new(EmptyArrayContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *EmptyArrayContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *EmptyArrayContext) EmptyArray() antlr.TerminalNode {
return s.GetToken(PlanParserEmptyArray, 0)
}
func (s *EmptyArrayContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitEmptyArray(s)
default:
return t.VisitChildren(s)
}
}
type PhraseMatchContext struct {
ExprContext
}
func NewPhraseMatchContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *PhraseMatchContext {
var p = new(PhraseMatchContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *PhraseMatchContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *PhraseMatchContext) PHRASEMATCH() antlr.TerminalNode {
return s.GetToken(PlanParserPHRASEMATCH, 0)
}
func (s *PhraseMatchContext) FieldName() IFieldNameContext {
var t antlr.RuleContext
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IFieldNameContext); ok {
t = ctx.(antlr.RuleContext)
break
}
}
if t == nil {
return nil
}
return t.(IFieldNameContext)
}
func (s *PhraseMatchContext) AllExpr() []IExprContext {
children := s.GetChildren()
len := 0
for _, ctx := range children {
if _, ok := ctx.(IExprContext); ok {
len++
}
}
tst := make([]IExprContext, len)
i := 0
for _, ctx := range children {
if t, ok := ctx.(IExprContext); ok {
tst[i] = t.(IExprContext)
i++
}
}
return tst
}
func (s *PhraseMatchContext) Expr(i int) IExprContext {
var t antlr.RuleContext
j := 0
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IExprContext); ok {
if j == i {
t = ctx.(antlr.RuleContext)
break
}
j++
}
}
if t == nil {
return nil
}
return t.(IExprContext)
}
func (s *PhraseMatchContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitPhraseMatch(s)
default:
return t.VisitChildren(s)
}
}
type ArrayLengthContext struct {
ExprContext
}
func NewArrayLengthContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ArrayLengthContext {
var p = new(ArrayLengthContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *ArrayLengthContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *ArrayLengthContext) ArrayLength() antlr.TerminalNode {
return s.GetToken(PlanParserArrayLength, 0)
}
func (s *ArrayLengthContext) FieldName() IFieldNameContext {
var t antlr.RuleContext
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IFieldNameContext); ok {
t = ctx.(antlr.RuleContext)
break
}
}
if t == nil {
return nil
}
return t.(IFieldNameContext)
}
func (s *ArrayLengthContext) JSONIdentifier() antlr.TerminalNode {
return s.GetToken(PlanParserJSONIdentifier, 0)
}
func (s *ArrayLengthContext) StructFieldIdentifier() antlr.TerminalNode {
return s.GetToken(PlanParserStructFieldIdentifier, 0)
}
func (s *ArrayLengthContext) StructSubFieldIdentifier() antlr.TerminalNode {
return s.GetToken(PlanParserStructSubFieldIdentifier, 0)
}
func (s *ArrayLengthContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitArrayLength(s)
default:
return t.VisitChildren(s)
}
}
type TermContext struct {
ExprContext
op antlr.Token
}
func NewTermContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *TermContext {
var p = new(TermContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *TermContext) GetOp() antlr.Token { return s.op }
func (s *TermContext) SetOp(v antlr.Token) { s.op = v }
func (s *TermContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *TermContext) AllExpr() []IExprContext {
children := s.GetChildren()
len := 0
for _, ctx := range children {
if _, ok := ctx.(IExprContext); ok {
len++
}
}
tst := make([]IExprContext, len)
i := 0
for _, ctx := range children {
if t, ok := ctx.(IExprContext); ok {
tst[i] = t.(IExprContext)
i++
}
}
return tst
}
func (s *TermContext) Expr(i int) IExprContext {
var t antlr.RuleContext
j := 0
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IExprContext); ok {
if j == i {
t = ctx.(antlr.RuleContext)
break
}
j++
}
}
if t == nil {
return nil
}
return t.(IExprContext)
}
func (s *TermContext) IN() antlr.TerminalNode {
return s.GetToken(PlanParserIN, 0)
}
func (s *TermContext) NOT() antlr.TerminalNode {
return s.GetToken(PlanParserNOT, 0)
}
func (s *TermContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitTerm(s)
default:
return t.VisitChildren(s)
}
}
type JSONContainsContext struct {
ExprContext
}
func NewJSONContainsContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *JSONContainsContext {
var p = new(JSONContainsContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *JSONContainsContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *JSONContainsContext) AllExpr() []IExprContext {
children := s.GetChildren()
len := 0
for _, ctx := range children {
if _, ok := ctx.(IExprContext); ok {
len++
}
}
tst := make([]IExprContext, len)
i := 0
for _, ctx := range children {
if t, ok := ctx.(IExprContext); ok {
tst[i] = t.(IExprContext)
i++
}
}
return tst
}
func (s *JSONContainsContext) Expr(i int) IExprContext {
var t antlr.RuleContext
j := 0
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IExprContext); ok {
if j == i {
t = ctx.(antlr.RuleContext)
break
}
j++
}
}
if t == nil {
return nil
}
return t.(IExprContext)
}
func (s *JSONContainsContext) JSONContains() antlr.TerminalNode {
return s.GetToken(PlanParserJSONContains, 0)
}
func (s *JSONContainsContext) ArrayContains() antlr.TerminalNode {
return s.GetToken(PlanParserArrayContains, 0)
}
func (s *JSONContainsContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitJSONContains(s)
default:
return t.VisitChildren(s)
}
}
type RangeContext struct {
ExprContext
op1 antlr.Token
op2 antlr.Token
}
func NewRangeContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *RangeContext {
var p = new(RangeContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *RangeContext) GetOp1() antlr.Token { return s.op1 }
func (s *RangeContext) GetOp2() antlr.Token { return s.op2 }
func (s *RangeContext) SetOp1(v antlr.Token) { s.op1 = v }
func (s *RangeContext) SetOp2(v antlr.Token) { s.op2 = v }
func (s *RangeContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *RangeContext) AllExpr() []IExprContext {
children := s.GetChildren()
len := 0
for _, ctx := range children {
if _, ok := ctx.(IExprContext); ok {
len++
}
}
tst := make([]IExprContext, len)
i := 0
for _, ctx := range children {
if t, ok := ctx.(IExprContext); ok {
tst[i] = t.(IExprContext)
i++
}
}
return tst
}
func (s *RangeContext) Expr(i int) IExprContext {
var t antlr.RuleContext
j := 0
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IExprContext); ok {
if j == i {
t = ctx.(antlr.RuleContext)
break
}
j++
}
}
if t == nil {
return nil
}
return t.(IExprContext)
}
func (s *RangeContext) AllLT() []antlr.TerminalNode {
return s.GetTokens(PlanParserLT)
}
func (s *RangeContext) LT(i int) antlr.TerminalNode {
return s.GetToken(PlanParserLT, i)
}
func (s *RangeContext) AllLE() []antlr.TerminalNode {
return s.GetTokens(PlanParserLE)
}
func (s *RangeContext) LE(i int) antlr.TerminalNode {
return s.GetToken(PlanParserLE, i)
}
func (s *RangeContext) FieldName() IFieldNameContext {
var t antlr.RuleContext
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IFieldNameContext); ok {
t = ctx.(antlr.RuleContext)
break
}
}
if t == nil {
return nil
}
return t.(IFieldNameContext)
}
func (s *RangeContext) JSONIdentifier() antlr.TerminalNode {
return s.GetToken(PlanParserJSONIdentifier, 0)
}
func (s *RangeContext) StructSubFieldIdentifier() antlr.TerminalNode {
return s.GetToken(PlanParserStructSubFieldIdentifier, 0)
}
func (s *RangeContext) StructIndexFieldIdentifier() antlr.TerminalNode {
return s.GetToken(PlanParserStructIndexFieldIdentifier, 0)
}
func (s *RangeContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitRange(s)
default:
return t.VisitChildren(s)
}
}
type STIsValidContext struct {
ExprContext
}
func NewSTIsValidContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *STIsValidContext {
var p = new(STIsValidContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *STIsValidContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *STIsValidContext) STIsValid() antlr.TerminalNode {
return s.GetToken(PlanParserSTIsValid, 0)
}
func (s *STIsValidContext) FieldName() IFieldNameContext {
var t antlr.RuleContext
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IFieldNameContext); ok {
t = ctx.(antlr.RuleContext)
break
}
}
if t == nil {
return nil
}
return t.(IFieldNameContext)
}
func (s *STIsValidContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitSTIsValid(s)
default:
return t.VisitChildren(s)
}
}
type MatchThresholdContext struct {
ExprContext
op antlr.Token
}
func NewMatchThresholdContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *MatchThresholdContext {
var p = new(MatchThresholdContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *MatchThresholdContext) GetOp() antlr.Token { return s.op }
func (s *MatchThresholdContext) SetOp(v antlr.Token) { s.op = v }
func (s *MatchThresholdContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *MatchThresholdContext) FieldName() IFieldNameContext {
var t antlr.RuleContext
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IFieldNameContext); ok {
t = ctx.(antlr.RuleContext)
break
}
}
if t == nil {
return nil
}
return t.(IFieldNameContext)
}
func (s *MatchThresholdContext) Expr() IExprContext {
var t antlr.RuleContext
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IExprContext); ok {
t = ctx.(antlr.RuleContext)
break
}
}
if t == nil {
return nil
}
return t.(IExprContext)
}
func (s *MatchThresholdContext) THRESHOLD() antlr.TerminalNode {
return s.GetToken(PlanParserTHRESHOLD, 0)
}
func (s *MatchThresholdContext) ASSIGN() antlr.TerminalNode {
return s.GetToken(PlanParserASSIGN, 0)
}
func (s *MatchThresholdContext) IntegerConstant() antlr.TerminalNode {
return s.GetToken(PlanParserIntegerConstant, 0)
}
func (s *MatchThresholdContext) MATCH_LEAST() antlr.TerminalNode {
return s.GetToken(PlanParserMATCH_LEAST, 0)
}
func (s *MatchThresholdContext) MATCH_MOST() antlr.TerminalNode {
return s.GetToken(PlanParserMATCH_MOST, 0)
}
func (s *MatchThresholdContext) MATCH_EXACT() antlr.TerminalNode {
return s.GetToken(PlanParserMATCH_EXACT, 0)
}
func (s *MatchThresholdContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitMatchThreshold(s)
default:
return t.VisitChildren(s)
}
}
type BitXorContext struct {
ExprContext
}
func NewBitXorContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *BitXorContext {
var p = new(BitXorContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *BitXorContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *BitXorContext) AllExpr() []IExprContext {
children := s.GetChildren()
len := 0
for _, ctx := range children {
if _, ok := ctx.(IExprContext); ok {
len++
}
}
tst := make([]IExprContext, len)
i := 0
for _, ctx := range children {
if t, ok := ctx.(IExprContext); ok {
tst[i] = t.(IExprContext)
i++
}
}
return tst
}
func (s *BitXorContext) Expr(i int) IExprContext {
var t antlr.RuleContext
j := 0
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IExprContext); ok {
if j == i {
t = ctx.(antlr.RuleContext)
break
}
j++
}
}
if t == nil {
return nil
}
return t.(IExprContext)
}
func (s *BitXorContext) BXOR() antlr.TerminalNode {
return s.GetToken(PlanParserBXOR, 0)
}
func (s *BitXorContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitBitXor(s)
default:
return t.VisitChildren(s)
}
}
type ElementFilterContext struct {
ExprContext
}
func NewElementFilterContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ElementFilterContext {
var p = new(ElementFilterContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *ElementFilterContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *ElementFilterContext) ElementFilter() antlr.TerminalNode {
return s.GetToken(PlanParserElementFilter, 0)
}
func (s *ElementFilterContext) FieldName() IFieldNameContext {
var t antlr.RuleContext
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IFieldNameContext); ok {
t = ctx.(antlr.RuleContext)
break
}
}
if t == nil {
return nil
}
return t.(IFieldNameContext)
}
func (s *ElementFilterContext) Expr() IExprContext {
var t antlr.RuleContext
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IExprContext); ok {
t = ctx.(antlr.RuleContext)
break
}
}
if t == nil {
return nil
}
return t.(IExprContext)
}
func (s *ElementFilterContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitElementFilter(s)
default:
return t.VisitChildren(s)
}
}
type BitAndContext struct {
ExprContext
}
func NewBitAndContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *BitAndContext {
var p = new(BitAndContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *BitAndContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *BitAndContext) AllExpr() []IExprContext {
children := s.GetChildren()
len := 0
for _, ctx := range children {
if _, ok := ctx.(IExprContext); ok {
len++
}
}
tst := make([]IExprContext, len)
i := 0
for _, ctx := range children {
if t, ok := ctx.(IExprContext); ok {
tst[i] = t.(IExprContext)
i++
}
}
return tst
}
func (s *BitAndContext) Expr(i int) IExprContext {
var t antlr.RuleContext
j := 0
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IExprContext); ok {
if j == i {
t = ctx.(antlr.RuleContext)
break
}
j++
}
}
if t == nil {
return nil
}
return t.(IExprContext)
}
func (s *BitAndContext) BAND() antlr.TerminalNode {
return s.GetToken(PlanParserBAND, 0)
}
func (s *BitAndContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitBitAnd(s)
default:
return t.VisitChildren(s)
}
}
type StructIndexFieldContext struct {
ExprContext
}
func NewStructIndexFieldContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *StructIndexFieldContext {
var p = new(StructIndexFieldContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *StructIndexFieldContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *StructIndexFieldContext) StructIndexFieldIdentifier() antlr.TerminalNode {
return s.GetToken(PlanParserStructIndexFieldIdentifier, 0)
}
func (s *StructIndexFieldContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitStructIndexField(s)
default:
return t.VisitChildren(s)
}
}
type JSONIdentifierContext struct {
ExprContext
}
func NewJSONIdentifierContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *JSONIdentifierContext {
var p = new(JSONIdentifierContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *JSONIdentifierContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *JSONIdentifierContext) JSONIdentifier() antlr.TerminalNode {
return s.GetToken(PlanParserJSONIdentifier, 0)
}
func (s *JSONIdentifierContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitJSONIdentifier(s)
default:
return t.VisitChildren(s)
}
}
type RandomSampleContext struct {
ExprContext
}
func NewRandomSampleContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *RandomSampleContext {
var p = new(RandomSampleContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *RandomSampleContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *RandomSampleContext) RANDOMSAMPLE() antlr.TerminalNode {
return s.GetToken(PlanParserRANDOMSAMPLE, 0)
}
func (s *RandomSampleContext) Expr() IExprContext {
var t antlr.RuleContext
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IExprContext); ok {
t = ctx.(antlr.RuleContext)
break
}
}
if t == nil {
return nil
}
return t.(IExprContext)
}
func (s *RandomSampleContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitRandomSample(s)
default:
return t.VisitChildren(s)
}
}
type RawStringContext struct {
ExprContext
}
func NewRawStringContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *RawStringContext {
var p = new(RawStringContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *RawStringContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *RawStringContext) RawStringLiteral() antlr.TerminalNode {
return s.GetToken(PlanParserRawStringLiteral, 0)
}
func (s *RawStringContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitRawString(s)
default:
return t.VisitChildren(s)
}
}
type SpatialBinaryContext struct {
ExprContext
op antlr.Token
}
func NewSpatialBinaryContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *SpatialBinaryContext {
var p = new(SpatialBinaryContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *SpatialBinaryContext) GetOp() antlr.Token { return s.op }
func (s *SpatialBinaryContext) SetOp(v antlr.Token) { s.op = v }
func (s *SpatialBinaryContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *SpatialBinaryContext) FieldName() IFieldNameContext {
var t antlr.RuleContext
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IFieldNameContext); ok {
t = ctx.(antlr.RuleContext)
break
}
}
if t == nil {
return nil
}
return t.(IFieldNameContext)
}
func (s *SpatialBinaryContext) Expr() IExprContext {
var t antlr.RuleContext
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IExprContext); ok {
t = ctx.(antlr.RuleContext)
break
}
}
if t == nil {
return nil
}
return t.(IExprContext)
}
func (s *SpatialBinaryContext) STEuqals() antlr.TerminalNode {
return s.GetToken(PlanParserSTEuqals, 0)
}
func (s *SpatialBinaryContext) STTouches() antlr.TerminalNode {
return s.GetToken(PlanParserSTTouches, 0)
}
func (s *SpatialBinaryContext) STOverlaps() antlr.TerminalNode {
return s.GetToken(PlanParserSTOverlaps, 0)
}
func (s *SpatialBinaryContext) STCrosses() antlr.TerminalNode {
return s.GetToken(PlanParserSTCrosses, 0)
}
func (s *SpatialBinaryContext) STContains() antlr.TerminalNode {
return s.GetToken(PlanParserSTContains, 0)
}
func (s *SpatialBinaryContext) STIntersects() antlr.TerminalNode {
return s.GetToken(PlanParserSTIntersects, 0)
}
func (s *SpatialBinaryContext) STWithin() antlr.TerminalNode {
return s.GetToken(PlanParserSTWithin, 0)
}
func (s *SpatialBinaryContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitSpatialBinary(s)
default:
return t.VisitChildren(s)
}
}
type ParensContext struct {
ExprContext
}
func NewParensContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ParensContext {
var p = new(ParensContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *ParensContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *ParensContext) Expr() IExprContext {
var t antlr.RuleContext
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IExprContext); ok {
t = ctx.(antlr.RuleContext)
break
}
}
if t == nil {
return nil
}
return t.(IExprContext)
}
func (s *ParensContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitParens(s)
default:
return t.VisitChildren(s)
}
}
type JSONContainsAllContext struct {
ExprContext
}
func NewJSONContainsAllContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *JSONContainsAllContext {
var p = new(JSONContainsAllContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *JSONContainsAllContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *JSONContainsAllContext) AllExpr() []IExprContext {
children := s.GetChildren()
len := 0
for _, ctx := range children {
if _, ok := ctx.(IExprContext); ok {
len++
}
}
tst := make([]IExprContext, len)
i := 0
for _, ctx := range children {
if t, ok := ctx.(IExprContext); ok {
tst[i] = t.(IExprContext)
i++
}
}
return tst
}
func (s *JSONContainsAllContext) Expr(i int) IExprContext {
var t antlr.RuleContext
j := 0
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IExprContext); ok {
if j == i {
t = ctx.(antlr.RuleContext)
break
}
j++
}
}
if t == nil {
return nil
}
return t.(IExprContext)
}
func (s *JSONContainsAllContext) JSONContainsAll() antlr.TerminalNode {
return s.GetToken(PlanParserJSONContainsAll, 0)
}
func (s *JSONContainsAllContext) ArrayContainsAll() antlr.TerminalNode {
return s.GetToken(PlanParserArrayContainsAll, 0)
}
func (s *JSONContainsAllContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitJSONContainsAll(s)
default:
return t.VisitChildren(s)
}
}
type LogicalOrContext struct {
ExprContext
}
func NewLogicalOrContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *LogicalOrContext {
var p = new(LogicalOrContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *LogicalOrContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *LogicalOrContext) AllExpr() []IExprContext {
children := s.GetChildren()
len := 0
for _, ctx := range children {
if _, ok := ctx.(IExprContext); ok {
len++
}
}
tst := make([]IExprContext, len)
i := 0
for _, ctx := range children {
if t, ok := ctx.(IExprContext); ok {
tst[i] = t.(IExprContext)
i++
}
}
return tst
}
func (s *LogicalOrContext) Expr(i int) IExprContext {
var t antlr.RuleContext
j := 0
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IExprContext); ok {
if j == i {
t = ctx.(antlr.RuleContext)
break
}
j++
}
}
if t == nil {
return nil
}
return t.(IExprContext)
}
func (s *LogicalOrContext) OR() antlr.TerminalNode {
return s.GetToken(PlanParserOR, 0)
}
func (s *LogicalOrContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitLogicalOr(s)
default:
return t.VisitChildren(s)
}
}
type MulDivModContext struct {
ExprContext
op antlr.Token
}
func NewMulDivModContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *MulDivModContext {
var p = new(MulDivModContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *MulDivModContext) GetOp() antlr.Token { return s.op }
func (s *MulDivModContext) SetOp(v antlr.Token) { s.op = v }
func (s *MulDivModContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *MulDivModContext) AllExpr() []IExprContext {
children := s.GetChildren()
len := 0
for _, ctx := range children {
if _, ok := ctx.(IExprContext); ok {
len++
}
}
tst := make([]IExprContext, len)
i := 0
for _, ctx := range children {
if t, ok := ctx.(IExprContext); ok {
tst[i] = t.(IExprContext)
i++
}
}
return tst
}
func (s *MulDivModContext) Expr(i int) IExprContext {
var t antlr.RuleContext
j := 0
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IExprContext); ok {
if j == i {
t = ctx.(antlr.RuleContext)
break
}
j++
}
}
if t == nil {
return nil
}
return t.(IExprContext)
}
func (s *MulDivModContext) MUL() antlr.TerminalNode {
return s.GetToken(PlanParserMUL, 0)
}
func (s *MulDivModContext) DIV() antlr.TerminalNode {
return s.GetToken(PlanParserDIV, 0)
}
func (s *MulDivModContext) MOD() antlr.TerminalNode {
return s.GetToken(PlanParserMOD, 0)
}
func (s *MulDivModContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitMulDivMod(s)
default:
return t.VisitChildren(s)
}
}
type StructFieldContext struct {
ExprContext
}
func NewStructFieldContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *StructFieldContext {
var p = new(StructFieldContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *StructFieldContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *StructFieldContext) StructFieldIdentifier() antlr.TerminalNode {
return s.GetToken(PlanParserStructFieldIdentifier, 0)
}
func (s *StructFieldContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitStructField(s)
default:
return t.VisitChildren(s)
}
}
type LogicalAndContext struct {
ExprContext
}
func NewLogicalAndContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *LogicalAndContext {
var p = new(LogicalAndContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *LogicalAndContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *LogicalAndContext) AllExpr() []IExprContext {
children := s.GetChildren()
len := 0
for _, ctx := range children {
if _, ok := ctx.(IExprContext); ok {
len++
}
}
tst := make([]IExprContext, len)
i := 0
for _, ctx := range children {
if t, ok := ctx.(IExprContext); ok {
tst[i] = t.(IExprContext)
i++
}
}
return tst
}
func (s *LogicalAndContext) Expr(i int) IExprContext {
var t antlr.RuleContext
j := 0
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IExprContext); ok {
if j == i {
t = ctx.(antlr.RuleContext)
break
}
j++
}
}
if t == nil {
return nil
}
return t.(IExprContext)
}
func (s *LogicalAndContext) AND() antlr.TerminalNode {
return s.GetToken(PlanParserAND, 0)
}
func (s *LogicalAndContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitLogicalAnd(s)
default:
return t.VisitChildren(s)
}
}
type TemplateVariableContext struct {
ExprContext
}
func NewTemplateVariableContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *TemplateVariableContext {
var p = new(TemplateVariableContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *TemplateVariableContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *TemplateVariableContext) LBRACE() antlr.TerminalNode {
return s.GetToken(PlanParserLBRACE, 0)
}
func (s *TemplateVariableContext) FieldName() IFieldNameContext {
var t antlr.RuleContext
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IFieldNameContext); ok {
t = ctx.(antlr.RuleContext)
break
}
}
if t == nil {
return nil
}
return t.(IFieldNameContext)
}
func (s *TemplateVariableContext) RBRACE() antlr.TerminalNode {
return s.GetToken(PlanParserRBRACE, 0)
}
func (s *TemplateVariableContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitTemplateVariable(s)
default:
return t.VisitChildren(s)
}
}
type MembershipMatchWithOptionContext struct {
ExprContext
function antlr.Token
field IFieldReferenceContext
option antlr.Token
kind antlr.Token
}
func NewMembershipMatchWithOptionContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *MembershipMatchWithOptionContext {
var p = new(MembershipMatchWithOptionContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *MembershipMatchWithOptionContext) GetFunction() antlr.Token { return s.function }
func (s *MembershipMatchWithOptionContext) GetOption() antlr.Token { return s.option }
func (s *MembershipMatchWithOptionContext) GetKind() antlr.Token { return s.kind }
func (s *MembershipMatchWithOptionContext) SetFunction(v antlr.Token) { s.function = v }
func (s *MembershipMatchWithOptionContext) SetOption(v antlr.Token) { s.option = v }
func (s *MembershipMatchWithOptionContext) SetKind(v antlr.Token) { s.kind = v }
func (s *MembershipMatchWithOptionContext) GetField() IFieldReferenceContext { return s.field }
func (s *MembershipMatchWithOptionContext) SetField(v IFieldReferenceContext) { s.field = v }
func (s *MembershipMatchWithOptionContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *MembershipMatchWithOptionContext) Expr() IExprContext {
var t antlr.RuleContext
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IExprContext); ok {
t = ctx.(antlr.RuleContext)
break
}
}
if t == nil {
return nil
}
return t.(IExprContext)
}
func (s *MembershipMatchWithOptionContext) ASSIGN() antlr.TerminalNode {
return s.GetToken(PlanParserASSIGN, 0)
}
func (s *MembershipMatchWithOptionContext) AllIdentifier() []antlr.TerminalNode {
return s.GetTokens(PlanParserIdentifier)
}
func (s *MembershipMatchWithOptionContext) Identifier(i int) antlr.TerminalNode {
return s.GetToken(PlanParserIdentifier, i)
}
func (s *MembershipMatchWithOptionContext) FieldReference() IFieldReferenceContext {
var t antlr.RuleContext
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IFieldReferenceContext); ok {
t = ctx.(antlr.RuleContext)
break
}
}
if t == nil {
return nil
}
return t.(IFieldReferenceContext)
}
func (s *MembershipMatchWithOptionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitMembershipMatchWithOption(s)
default:
return t.VisitChildren(s)
}
}
type TimestamptzCompareReverseContext struct {
ExprContext
compare_string antlr.Token
op2 antlr.Token
op1 antlr.Token
interval_string antlr.Token
}
func NewTimestamptzCompareReverseContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *TimestamptzCompareReverseContext {
var p = new(TimestamptzCompareReverseContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *TimestamptzCompareReverseContext) GetCompare_string() antlr.Token { return s.compare_string }
func (s *TimestamptzCompareReverseContext) GetOp2() antlr.Token { return s.op2 }
func (s *TimestamptzCompareReverseContext) GetOp1() antlr.Token { return s.op1 }
func (s *TimestamptzCompareReverseContext) GetInterval_string() antlr.Token { return s.interval_string }
func (s *TimestamptzCompareReverseContext) SetCompare_string(v antlr.Token) { s.compare_string = v }
func (s *TimestamptzCompareReverseContext) SetOp2(v antlr.Token) { s.op2 = v }
func (s *TimestamptzCompareReverseContext) SetOp1(v antlr.Token) { s.op1 = v }
func (s *TimestamptzCompareReverseContext) SetInterval_string(v antlr.Token) { s.interval_string = v }
func (s *TimestamptzCompareReverseContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *TimestamptzCompareReverseContext) ISO() antlr.TerminalNode {
return s.GetToken(PlanParserISO, 0)
}
func (s *TimestamptzCompareReverseContext) FieldName() IFieldNameContext {
var t antlr.RuleContext
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IFieldNameContext); ok {
t = ctx.(antlr.RuleContext)
break
}
}
if t == nil {
return nil
}
return t.(IFieldNameContext)
}
func (s *TimestamptzCompareReverseContext) AllStringLiteral() []antlr.TerminalNode {
return s.GetTokens(PlanParserStringLiteral)
}
func (s *TimestamptzCompareReverseContext) StringLiteral(i int) antlr.TerminalNode {
return s.GetToken(PlanParserStringLiteral, i)
}
func (s *TimestamptzCompareReverseContext) LT() antlr.TerminalNode {
return s.GetToken(PlanParserLT, 0)
}
func (s *TimestamptzCompareReverseContext) LE() antlr.TerminalNode {
return s.GetToken(PlanParserLE, 0)
}
func (s *TimestamptzCompareReverseContext) GT() antlr.TerminalNode {
return s.GetToken(PlanParserGT, 0)
}
func (s *TimestamptzCompareReverseContext) GE() antlr.TerminalNode {
return s.GetToken(PlanParserGE, 0)
}
func (s *TimestamptzCompareReverseContext) EQ() antlr.TerminalNode {
return s.GetToken(PlanParserEQ, 0)
}
func (s *TimestamptzCompareReverseContext) NE() antlr.TerminalNode {
return s.GetToken(PlanParserNE, 0)
}
func (s *TimestamptzCompareReverseContext) INTERVAL() antlr.TerminalNode {
return s.GetToken(PlanParserINTERVAL, 0)
}
func (s *TimestamptzCompareReverseContext) ADD() antlr.TerminalNode {
return s.GetToken(PlanParserADD, 0)
}
func (s *TimestamptzCompareReverseContext) SUB() antlr.TerminalNode {
return s.GetToken(PlanParserSUB, 0)
}
func (s *TimestamptzCompareReverseContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitTimestamptzCompareReverse(s)
default:
return t.VisitChildren(s)
}
}
type STDWithinContext struct {
ExprContext
}
func NewSTDWithinContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *STDWithinContext {
var p = new(STDWithinContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *STDWithinContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *STDWithinContext) STDWithin() antlr.TerminalNode {
return s.GetToken(PlanParserSTDWithin, 0)
}
func (s *STDWithinContext) FieldName() IFieldNameContext {
var t antlr.RuleContext
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IFieldNameContext); ok {
t = ctx.(antlr.RuleContext)
break
}
}
if t == nil {
return nil
}
return t.(IFieldNameContext)
}
func (s *STDWithinContext) AllExpr() []IExprContext {
children := s.GetChildren()
len := 0
for _, ctx := range children {
if _, ok := ctx.(IExprContext); ok {
len++
}
}
tst := make([]IExprContext, len)
i := 0
for _, ctx := range children {
if t, ok := ctx.(IExprContext); ok {
tst[i] = t.(IExprContext)
i++
}
}
return tst
}
func (s *STDWithinContext) Expr(i int) IExprContext {
var t antlr.RuleContext
j := 0
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IExprContext); ok {
if j == i {
t = ctx.(antlr.RuleContext)
break
}
j++
}
}
if t == nil {
return nil
}
return t.(IExprContext)
}
func (s *STDWithinContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitSTDWithin(s)
default:
return t.VisitChildren(s)
}
}
type CallContext struct {
ExprContext
}
func NewCallContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *CallContext {
var p = new(CallContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *CallContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *CallContext) Identifier() antlr.TerminalNode {
return s.GetToken(PlanParserIdentifier, 0)
}
func (s *CallContext) AllExpr() []IExprContext {
children := s.GetChildren()
len := 0
for _, ctx := range children {
if _, ok := ctx.(IExprContext); ok {
len++
}
}
tst := make([]IExprContext, len)
i := 0
for _, ctx := range children {
if t, ok := ctx.(IExprContext); ok {
tst[i] = t.(IExprContext)
i++
}
}
return tst
}
func (s *CallContext) Expr(i int) IExprContext {
var t antlr.RuleContext
j := 0
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IExprContext); ok {
if j == i {
t = ctx.(antlr.RuleContext)
break
}
j++
}
}
if t == nil {
return nil
}
return t.(IExprContext)
}
func (s *CallContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitCall(s)
default:
return t.VisitChildren(s)
}
}
type BitOrContext struct {
ExprContext
}
func NewBitOrContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *BitOrContext {
var p = new(BitOrContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *BitOrContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *BitOrContext) AllExpr() []IExprContext {
children := s.GetChildren()
len := 0
for _, ctx := range children {
if _, ok := ctx.(IExprContext); ok {
len++
}
}
tst := make([]IExprContext, len)
i := 0
for _, ctx := range children {
if t, ok := ctx.(IExprContext); ok {
tst[i] = t.(IExprContext)
i++
}
}
return tst
}
func (s *BitOrContext) Expr(i int) IExprContext {
var t antlr.RuleContext
j := 0
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IExprContext); ok {
if j == i {
t = ctx.(antlr.RuleContext)
break
}
j++
}
}
if t == nil {
return nil
}
return t.(IExprContext)
}
func (s *BitOrContext) BOR() antlr.TerminalNode {
return s.GetToken(PlanParserBOR, 0)
}
func (s *BitOrContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitBitOr(s)
default:
return t.VisitChildren(s)
}
}
type AddSubContext struct {
ExprContext
op antlr.Token
}
func NewAddSubContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *AddSubContext {
var p = new(AddSubContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *AddSubContext) GetOp() antlr.Token { return s.op }
func (s *AddSubContext) SetOp(v antlr.Token) { s.op = v }
func (s *AddSubContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *AddSubContext) AllExpr() []IExprContext {
children := s.GetChildren()
len := 0
for _, ctx := range children {
if _, ok := ctx.(IExprContext); ok {
len++
}
}
tst := make([]IExprContext, len)
i := 0
for _, ctx := range children {
if t, ok := ctx.(IExprContext); ok {
tst[i] = t.(IExprContext)
i++
}
}
return tst
}
func (s *AddSubContext) Expr(i int) IExprContext {
var t antlr.RuleContext
j := 0
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IExprContext); ok {
if j == i {
t = ctx.(antlr.RuleContext)
break
}
j++
}
}
if t == nil {
return nil
}
return t.(IExprContext)
}
func (s *AddSubContext) ADD() antlr.TerminalNode {
return s.GetToken(PlanParserADD, 0)
}
func (s *AddSubContext) SUB() antlr.TerminalNode {
return s.GetToken(PlanParserSUB, 0)
}
func (s *AddSubContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitAddSub(s)
default:
return t.VisitChildren(s)
}
}
type RelationalContext struct {
ExprContext
op antlr.Token
}
func NewRelationalContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *RelationalContext {
var p = new(RelationalContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *RelationalContext) GetOp() antlr.Token { return s.op }
func (s *RelationalContext) SetOp(v antlr.Token) { s.op = v }
func (s *RelationalContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *RelationalContext) AllExpr() []IExprContext {
children := s.GetChildren()
len := 0
for _, ctx := range children {
if _, ok := ctx.(IExprContext); ok {
len++
}
}
tst := make([]IExprContext, len)
i := 0
for _, ctx := range children {
if t, ok := ctx.(IExprContext); ok {
tst[i] = t.(IExprContext)
i++
}
}
return tst
}
func (s *RelationalContext) Expr(i int) IExprContext {
var t antlr.RuleContext
j := 0
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IExprContext); ok {
if j == i {
t = ctx.(antlr.RuleContext)
break
}
j++
}
}
if t == nil {
return nil
}
return t.(IExprContext)
}
func (s *RelationalContext) LT() antlr.TerminalNode {
return s.GetToken(PlanParserLT, 0)
}
func (s *RelationalContext) LE() antlr.TerminalNode {
return s.GetToken(PlanParserLE, 0)
}
func (s *RelationalContext) GT() antlr.TerminalNode {
return s.GetToken(PlanParserGT, 0)
}
func (s *RelationalContext) GE() antlr.TerminalNode {
return s.GetToken(PlanParserGE, 0)
}
func (s *RelationalContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitRelational(s)
default:
return t.VisitChildren(s)
}
}
type TextMatchContext struct {
ExprContext
}
func NewTextMatchContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *TextMatchContext {
var p = new(TextMatchContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *TextMatchContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *TextMatchContext) TEXTMATCH() antlr.TerminalNode {
return s.GetToken(PlanParserTEXTMATCH, 0)
}
func (s *TextMatchContext) FieldName() IFieldNameContext {
var t antlr.RuleContext
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IFieldNameContext); ok {
t = ctx.(antlr.RuleContext)
break
}
}
if t == nil {
return nil
}
return t.(IFieldNameContext)
}
func (s *TextMatchContext) Expr() IExprContext {
var t antlr.RuleContext
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IExprContext); ok {
t = ctx.(antlr.RuleContext)
break
}
}
if t == nil {
return nil
}
return t.(IExprContext)
}
func (s *TextMatchContext) TextMatchOption() ITextMatchOptionContext {
var t antlr.RuleContext
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(ITextMatchOptionContext); ok {
t = ctx.(antlr.RuleContext)
break
}
}
if t == nil {
return nil
}
return t.(ITextMatchOptionContext)
}
func (s *TextMatchContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitTextMatch(s)
default:
return t.VisitChildren(s)
}
}
type MatchSimpleContext struct {
ExprContext
op antlr.Token
}
func NewMatchSimpleContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *MatchSimpleContext {
var p = new(MatchSimpleContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *MatchSimpleContext) GetOp() antlr.Token { return s.op }
func (s *MatchSimpleContext) SetOp(v antlr.Token) { s.op = v }
func (s *MatchSimpleContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *MatchSimpleContext) FieldName() IFieldNameContext {
var t antlr.RuleContext
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IFieldNameContext); ok {
t = ctx.(antlr.RuleContext)
break
}
}
if t == nil {
return nil
}
return t.(IFieldNameContext)
}
func (s *MatchSimpleContext) Expr() IExprContext {
var t antlr.RuleContext
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IExprContext); ok {
t = ctx.(antlr.RuleContext)
break
}
}
if t == nil {
return nil
}
return t.(IExprContext)
}
func (s *MatchSimpleContext) MATCH_ALL() antlr.TerminalNode {
return s.GetToken(PlanParserMATCH_ALL, 0)
}
func (s *MatchSimpleContext) MATCH_ANY() antlr.TerminalNode {
return s.GetToken(PlanParserMATCH_ANY, 0)
}
func (s *MatchSimpleContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitMatchSimple(s)
default:
return t.VisitChildren(s)
}
}
type UnaryContext struct {
ExprContext
op antlr.Token
}
func NewUnaryContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *UnaryContext {
var p = new(UnaryContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *UnaryContext) GetOp() antlr.Token { return s.op }
func (s *UnaryContext) SetOp(v antlr.Token) { s.op = v }
func (s *UnaryContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *UnaryContext) Expr() IExprContext {
var t antlr.RuleContext
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IExprContext); ok {
t = ctx.(antlr.RuleContext)
break
}
}
if t == nil {
return nil
}
return t.(IExprContext)
}
func (s *UnaryContext) ADD() antlr.TerminalNode {
return s.GetToken(PlanParserADD, 0)
}
func (s *UnaryContext) SUB() antlr.TerminalNode {
return s.GetToken(PlanParserSUB, 0)
}
func (s *UnaryContext) BNOT() antlr.TerminalNode {
return s.GetToken(PlanParserBNOT, 0)
}
func (s *UnaryContext) NOT() antlr.TerminalNode {
return s.GetToken(PlanParserNOT, 0)
}
func (s *UnaryContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitUnary(s)
default:
return t.VisitChildren(s)
}
}
type IntegerContext struct {
ExprContext
}
func NewIntegerContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *IntegerContext {
var p = new(IntegerContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *IntegerContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *IntegerContext) IntegerConstant() antlr.TerminalNode {
return s.GetToken(PlanParserIntegerConstant, 0)
}
func (s *IntegerContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitInteger(s)
default:
return t.VisitChildren(s)
}
}
type ArrayContext struct {
ExprContext
}
func NewArrayContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ArrayContext {
var p = new(ArrayContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *ArrayContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *ArrayContext) AllExpr() []IExprContext {
children := s.GetChildren()
len := 0
for _, ctx := range children {
if _, ok := ctx.(IExprContext); ok {
len++
}
}
tst := make([]IExprContext, len)
i := 0
for _, ctx := range children {
if t, ok := ctx.(IExprContext); ok {
tst[i] = t.(IExprContext)
i++
}
}
return tst
}
func (s *ArrayContext) Expr(i int) IExprContext {
var t antlr.RuleContext
j := 0
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IExprContext); ok {
if j == i {
t = ctx.(antlr.RuleContext)
break
}
j++
}
}
if t == nil {
return nil
}
return t.(IExprContext)
}
func (s *ArrayContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitArray(s)
default:
return t.VisitChildren(s)
}
}
type JSONContainsAnyContext struct {
ExprContext
}
func NewJSONContainsAnyContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *JSONContainsAnyContext {
var p = new(JSONContainsAnyContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *JSONContainsAnyContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *JSONContainsAnyContext) AllExpr() []IExprContext {
children := s.GetChildren()
len := 0
for _, ctx := range children {
if _, ok := ctx.(IExprContext); ok {
len++
}
}
tst := make([]IExprContext, len)
i := 0
for _, ctx := range children {
if t, ok := ctx.(IExprContext); ok {
tst[i] = t.(IExprContext)
i++
}
}
return tst
}
func (s *JSONContainsAnyContext) Expr(i int) IExprContext {
var t antlr.RuleContext
j := 0
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IExprContext); ok {
if j == i {
t = ctx.(antlr.RuleContext)
break
}
j++
}
}
if t == nil {
return nil
}
return t.(IExprContext)
}
func (s *JSONContainsAnyContext) JSONContainsAny() antlr.TerminalNode {
return s.GetToken(PlanParserJSONContainsAny, 0)
}
func (s *JSONContainsAnyContext) ArrayContainsAny() antlr.TerminalNode {
return s.GetToken(PlanParserArrayContainsAny, 0)
}
func (s *JSONContainsAnyContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitJSONContainsAny(s)
default:
return t.VisitChildren(s)
}
}
type ExistsContext struct {
ExprContext
}
func NewExistsContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ExistsContext {
var p = new(ExistsContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *ExistsContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *ExistsContext) EXISTS() antlr.TerminalNode {
return s.GetToken(PlanParserEXISTS, 0)
}
func (s *ExistsContext) Expr() IExprContext {
var t antlr.RuleContext
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IExprContext); ok {
t = ctx.(antlr.RuleContext)
break
}
}
if t == nil {
return nil
}
return t.(IExprContext)
}
func (s *ExistsContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitExists(s)
default:
return t.VisitChildren(s)
}
}
type IsNullContext struct {
ExprContext
}
func NewIsNullContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *IsNullContext {
var p = new(IsNullContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *IsNullContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *IsNullContext) ISNULL() antlr.TerminalNode {
return s.GetToken(PlanParserISNULL, 0)
}
func (s *IsNullContext) FieldName() IFieldNameContext {
var t antlr.RuleContext
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IFieldNameContext); ok {
t = ctx.(antlr.RuleContext)
break
}
}
if t == nil {
return nil
}
return t.(IFieldNameContext)
}
func (s *IsNullContext) JSONIdentifier() antlr.TerminalNode {
return s.GetToken(PlanParserJSONIdentifier, 0)
}
func (s *IsNullContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitIsNull(s)
default:
return t.VisitChildren(s)
}
}
type RegexMatchContext struct {
ExprContext
}
func NewRegexMatchContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *RegexMatchContext {
var p = new(RegexMatchContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *RegexMatchContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *RegexMatchContext) AllExpr() []IExprContext {
children := s.GetChildren()
len := 0
for _, ctx := range children {
if _, ok := ctx.(IExprContext); ok {
len++
}
}
tst := make([]IExprContext, len)
i := 0
for _, ctx := range children {
if t, ok := ctx.(IExprContext); ok {
tst[i] = t.(IExprContext)
i++
}
}
return tst
}
func (s *RegexMatchContext) Expr(i int) IExprContext {
var t antlr.RuleContext
j := 0
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IExprContext); ok {
if j == i {
t = ctx.(antlr.RuleContext)
break
}
j++
}
}
if t == nil {
return nil
}
return t.(IExprContext)
}
func (s *RegexMatchContext) REGEXMATCH() antlr.TerminalNode {
return s.GetToken(PlanParserREGEXMATCH, 0)
}
func (s *RegexMatchContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitRegexMatch(s)
default:
return t.VisitChildren(s)
}
}
type StructSubFieldContext struct {
ExprContext
}
func NewStructSubFieldContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *StructSubFieldContext {
var p = new(StructSubFieldContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *StructSubFieldContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *StructSubFieldContext) StructSubFieldIdentifier() antlr.TerminalNode {
return s.GetToken(PlanParserStructSubFieldIdentifier, 0)
}
func (s *StructSubFieldContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitStructSubField(s)
default:
return t.VisitChildren(s)
}
}
type PowerContext struct {
ExprContext
}
func NewPowerContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *PowerContext {
var p = new(PowerContext)
InitEmptyExprContext(&p.ExprContext)
p.parser = parser
p.CopyAll(ctx.(*ExprContext))
return p
}
func (s *PowerContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *PowerContext) AllExpr() []IExprContext {
children := s.GetChildren()
len := 0
for _, ctx := range children {
if _, ok := ctx.(IExprContext); ok {
len++
}
}
tst := make([]IExprContext, len)
i := 0
for _, ctx := range children {
if t, ok := ctx.(IExprContext); ok {
tst[i] = t.(IExprContext)
i++
}
}
return tst
}
func (s *PowerContext) Expr(i int) IExprContext {
var t antlr.RuleContext
j := 0
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IExprContext); ok {
if j == i {
t = ctx.(antlr.RuleContext)
break
}
j++
}
}
if t == nil {
return nil
}
return t.(IExprContext)
}
func (s *PowerContext) POW() antlr.TerminalNode {
return s.GetToken(PlanParserPOW, 0)
}
func (s *PowerContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitPower(s)
default:
return t.VisitChildren(s)
}
}
func (p *PlanParser) Expr() (localctx IExprContext) {
return p.expr(0)
}
func (p *PlanParser) expr(_p int) (localctx IExprContext) {
var _parentctx antlr.ParserRuleContext = p.GetParserRuleContext()
_parentState := p.GetState()
localctx = NewExprContext(p, p.GetParserRuleContext(), _parentState)
var _prevctx IExprContext = localctx
var _ antlr.ParserRuleContext = _prevctx // TODO: To prevent unused variable warning.
_startState := 0
p.EnterRecursionRule(localctx, 0, PlanParserRULE_expr, _p)
var _la int
var _alt int
p.EnterOuterAlt(localctx, 1)
p.SetState(219)
p.GetErrorHandler().Sync(p)
if p.HasError() {
goto errorExit
}
switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 13, p.GetParserRuleContext()) {
case 1:
localctx = NewTimestamptzCompareForwardContext(p, localctx)
p.SetParserRuleContext(localctx)
_prevctx = localctx
{
p.SetState(9)
p.FieldName()
}
p.SetState(13)
p.GetErrorHandler().Sync(p)
if p.HasError() {
goto errorExit
}
_la = p.GetTokenStream().LA(1)
if _la == PlanParserADD || _la == PlanParserSUB {
{
p.SetState(10)
var _lt = p.GetTokenStream().LT(1)
localctx.(*TimestamptzCompareForwardContext).op1 = _lt
_la = p.GetTokenStream().LA(1)
if !(_la == PlanParserADD || _la == PlanParserSUB) {
var _ri = p.GetErrorHandler().RecoverInline(p)
localctx.(*TimestamptzCompareForwardContext).op1 = _ri
} else {
p.GetErrorHandler().ReportMatch(p)
p.Consume()
}
}
{
p.SetState(11)
p.Match(PlanParserINTERVAL)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(12)
var _m = p.Match(PlanParserStringLiteral)
localctx.(*TimestamptzCompareForwardContext).interval_string = _m
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
}
{
p.SetState(15)
var _lt = p.GetTokenStream().LT(1)
localctx.(*TimestamptzCompareForwardContext).op2 = _lt
_la = p.GetTokenStream().LA(1)
if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&16128) != 0) {
var _ri = p.GetErrorHandler().RecoverInline(p)
localctx.(*TimestamptzCompareForwardContext).op2 = _ri
} else {
p.GetErrorHandler().ReportMatch(p)
p.Consume()
}
}
{
p.SetState(16)
p.Match(PlanParserISO)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(17)
var _m = p.Match(PlanParserStringLiteral)
localctx.(*TimestamptzCompareForwardContext).compare_string = _m
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case 2:
localctx = NewTimestamptzCompareReverseContext(p, localctx)
p.SetParserRuleContext(localctx)
_prevctx = localctx
{
p.SetState(19)
p.Match(PlanParserISO)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(20)
var _m = p.Match(PlanParserStringLiteral)
localctx.(*TimestamptzCompareReverseContext).compare_string = _m
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(21)
var _lt = p.GetTokenStream().LT(1)
localctx.(*TimestamptzCompareReverseContext).op2 = _lt
_la = p.GetTokenStream().LA(1)
if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&16128) != 0) {
var _ri = p.GetErrorHandler().RecoverInline(p)
localctx.(*TimestamptzCompareReverseContext).op2 = _ri
} else {
p.GetErrorHandler().ReportMatch(p)
p.Consume()
}
}
{
p.SetState(22)
p.FieldName()
}
p.SetState(26)
p.GetErrorHandler().Sync(p)
if p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 1, p.GetParserRuleContext()) == 1 {
{
p.SetState(23)
var _lt = p.GetTokenStream().LT(1)
localctx.(*TimestamptzCompareReverseContext).op1 = _lt
_la = p.GetTokenStream().LA(1)
if !(_la == PlanParserADD || _la == PlanParserSUB) {
var _ri = p.GetErrorHandler().RecoverInline(p)
localctx.(*TimestamptzCompareReverseContext).op1 = _ri
} else {
p.GetErrorHandler().ReportMatch(p)
p.Consume()
}
}
{
p.SetState(24)
p.Match(PlanParserINTERVAL)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(25)
var _m = p.Match(PlanParserStringLiteral)
localctx.(*TimestamptzCompareReverseContext).interval_string = _m
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
} else if p.HasError() { // JIM
goto errorExit
}
case 3:
localctx = NewIntegerContext(p, localctx)
p.SetParserRuleContext(localctx)
_prevctx = localctx
{
p.SetState(28)
p.Match(PlanParserIntegerConstant)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case 4:
localctx = NewFloatingContext(p, localctx)
p.SetParserRuleContext(localctx)
_prevctx = localctx
{
p.SetState(29)
p.Match(PlanParserFloatingConstant)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case 5:
localctx = NewBooleanContext(p, localctx)
p.SetParserRuleContext(localctx)
_prevctx = localctx
{
p.SetState(30)
p.Match(PlanParserBooleanConstant)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case 6:
localctx = NewStringContext(p, localctx)
p.SetParserRuleContext(localctx)
_prevctx = localctx
{
p.SetState(31)
p.Match(PlanParserStringLiteral)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case 7:
localctx = NewRawStringContext(p, localctx)
p.SetParserRuleContext(localctx)
_prevctx = localctx
{
p.SetState(32)
p.Match(PlanParserRawStringLiteral)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case 8:
localctx = NewIdentifierContext(p, localctx)
p.SetParserRuleContext(localctx)
_prevctx = localctx
p.SetState(35)
p.GetErrorHandler().Sync(p)
if p.HasError() {
goto errorExit
}
switch p.GetTokenStream().LA(1) {
case PlanParserTEXTMATCHFUZZY, PlanParserMATCH_ALL, PlanParserMATCH_ANY, PlanParserMATCH_LEAST, PlanParserMATCH_MOST, PlanParserMATCH_EXACT, PlanParserINTERVAL, PlanParserISO, PlanParserMINIMUM_SHOULD_MATCH, PlanParserTHRESHOLD, PlanParserElementFilter, PlanParserSTEuqals, PlanParserSTTouches, PlanParserSTOverlaps, PlanParserSTCrosses, PlanParserSTContains, PlanParserSTIntersects, PlanParserSTWithin, PlanParserSTDWithin, PlanParserSTIsValid, PlanParserIdentifier:
{
p.SetState(33)
p.FieldName()
}
case PlanParserMeta:
{
p.SetState(34)
p.Match(PlanParserMeta)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
default:
p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
goto errorExit
}
case 9:
localctx = NewJSONIdentifierContext(p, localctx)
p.SetParserRuleContext(localctx)
_prevctx = localctx
{
p.SetState(37)
p.Match(PlanParserJSONIdentifier)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case 10:
localctx = NewStructFieldContext(p, localctx)
p.SetParserRuleContext(localctx)
_prevctx = localctx
{
p.SetState(38)
p.Match(PlanParserStructFieldIdentifier)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case 11:
localctx = NewStructIndexFieldContext(p, localctx)
p.SetParserRuleContext(localctx)
_prevctx = localctx
{
p.SetState(39)
p.Match(PlanParserStructIndexFieldIdentifier)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case 12:
localctx = NewStructSubFieldContext(p, localctx)
p.SetParserRuleContext(localctx)
_prevctx = localctx
{
p.SetState(40)
p.Match(PlanParserStructSubFieldIdentifier)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case 13:
localctx = NewTemplateVariableContext(p, localctx)
p.SetParserRuleContext(localctx)
_prevctx = localctx
{
p.SetState(41)
p.Match(PlanParserLBRACE)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(42)
p.FieldName()
}
{
p.SetState(43)
p.Match(PlanParserRBRACE)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case 14:
localctx = NewParensContext(p, localctx)
p.SetParserRuleContext(localctx)
_prevctx = localctx
{
p.SetState(45)
p.Match(PlanParserT__0)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(46)
p.expr(0)
}
{
p.SetState(47)
p.Match(PlanParserT__1)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case 15:
localctx = NewArrayContext(p, localctx)
p.SetParserRuleContext(localctx)
_prevctx = localctx
{
p.SetState(49)
p.Match(PlanParserT__2)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(50)
p.expr(0)
}
p.SetState(55)
p.GetErrorHandler().Sync(p)
if p.HasError() {
goto errorExit
}
_alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 3, p.GetParserRuleContext())
if p.HasError() {
goto errorExit
}
for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
if _alt == 1 {
{
p.SetState(51)
p.Match(PlanParserT__3)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(52)
p.expr(0)
}
}
p.SetState(57)
p.GetErrorHandler().Sync(p)
if p.HasError() {
goto errorExit
}
_alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 3, p.GetParserRuleContext())
if p.HasError() {
goto errorExit
}
}
p.SetState(59)
p.GetErrorHandler().Sync(p)
if p.HasError() {
goto errorExit
}
_la = p.GetTokenStream().LA(1)
if _la == PlanParserT__3 {
{
p.SetState(58)
p.Match(PlanParserT__3)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
}
{
p.SetState(61)
p.Match(PlanParserT__4)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case 16:
localctx = NewEmptyArrayContext(p, localctx)
p.SetParserRuleContext(localctx)
_prevctx = localctx
{
p.SetState(63)
p.Match(PlanParserEmptyArray)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case 17:
localctx = NewExistsContext(p, localctx)
p.SetParserRuleContext(localctx)
_prevctx = localctx
{
p.SetState(64)
p.Match(PlanParserEXISTS)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(65)
p.expr(37)
}
case 18:
localctx = NewTextMatchContext(p, localctx)
p.SetParserRuleContext(localctx)
_prevctx = localctx
{
p.SetState(66)
p.Match(PlanParserTEXTMATCH)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(67)
p.Match(PlanParserT__0)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(68)
p.FieldName()
}
{
p.SetState(69)
p.Match(PlanParserT__3)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(70)
p.expr(0)
}
p.SetState(73)
p.GetErrorHandler().Sync(p)
if p.HasError() {
goto errorExit
}
_la = p.GetTokenStream().LA(1)
if _la == PlanParserT__3 {
{
p.SetState(71)
p.Match(PlanParserT__3)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(72)
p.TextMatchOption()
}
}
{
p.SetState(75)
p.Match(PlanParserT__1)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case 19:
localctx = NewTextMatchFuzzyContext(p, localctx)
p.SetParserRuleContext(localctx)
_prevctx = localctx
{
p.SetState(77)
p.Match(PlanParserTEXTMATCHFUZZY)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(78)
p.Match(PlanParserT__0)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(79)
p.FieldName()
}
{
p.SetState(80)
p.Match(PlanParserT__3)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(81)
p.expr(0)
}
{
p.SetState(82)
p.Match(PlanParserT__3)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(83)
p.Match(PlanParserIdentifier)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(84)
p.Match(PlanParserASSIGN)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(85)
p.Match(PlanParserIntegerConstant)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(86)
p.Match(PlanParserT__1)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case 20:
localctx = NewPhraseMatchContext(p, localctx)
p.SetParserRuleContext(localctx)
_prevctx = localctx
{
p.SetState(88)
p.Match(PlanParserPHRASEMATCH)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(89)
p.Match(PlanParserT__0)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(90)
p.FieldName()
}
{
p.SetState(91)
p.Match(PlanParserT__3)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(92)
p.expr(0)
}
p.SetState(95)
p.GetErrorHandler().Sync(p)
if p.HasError() {
goto errorExit
}
_la = p.GetTokenStream().LA(1)
if _la == PlanParserT__3 {
{
p.SetState(93)
p.Match(PlanParserT__3)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(94)
p.expr(0)
}
}
{
p.SetState(97)
p.Match(PlanParserT__1)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case 21:
localctx = NewRandomSampleContext(p, localctx)
p.SetParserRuleContext(localctx)
_prevctx = localctx
{
p.SetState(99)
p.Match(PlanParserRANDOMSAMPLE)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(100)
p.Match(PlanParserT__0)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(101)
p.expr(0)
}
{
p.SetState(102)
p.Match(PlanParserT__1)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case 22:
localctx = NewElementFilterContext(p, localctx)
p.SetParserRuleContext(localctx)
_prevctx = localctx
{
p.SetState(104)
p.Match(PlanParserElementFilter)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(105)
p.Match(PlanParserT__0)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(106)
p.FieldName()
}
{
p.SetState(107)
p.Match(PlanParserT__3)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(108)
p.expr(0)
}
{
p.SetState(109)
p.Match(PlanParserT__1)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case 23:
localctx = NewMatchSimpleContext(p, localctx)
p.SetParserRuleContext(localctx)
_prevctx = localctx
{
p.SetState(111)
var _lt = p.GetTokenStream().LT(1)
localctx.(*MatchSimpleContext).op = _lt
_la = p.GetTokenStream().LA(1)
if !(_la == PlanParserMATCH_ALL || _la == PlanParserMATCH_ANY) {
var _ri = p.GetErrorHandler().RecoverInline(p)
localctx.(*MatchSimpleContext).op = _ri
} else {
p.GetErrorHandler().ReportMatch(p)
p.Consume()
}
}
{
p.SetState(112)
p.Match(PlanParserT__0)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(113)
p.FieldName()
}
{
p.SetState(114)
p.Match(PlanParserT__3)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(115)
p.expr(0)
}
{
p.SetState(116)
p.Match(PlanParserT__1)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case 24:
localctx = NewMatchThresholdContext(p, localctx)
p.SetParserRuleContext(localctx)
_prevctx = localctx
{
p.SetState(118)
var _lt = p.GetTokenStream().LT(1)
localctx.(*MatchThresholdContext).op = _lt
_la = p.GetTokenStream().LA(1)
if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&29360128) != 0) {
var _ri = p.GetErrorHandler().RecoverInline(p)
localctx.(*MatchThresholdContext).op = _ri
} else {
p.GetErrorHandler().ReportMatch(p)
p.Consume()
}
}
{
p.SetState(119)
p.Match(PlanParserT__0)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(120)
p.FieldName()
}
{
p.SetState(121)
p.Match(PlanParserT__3)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(122)
p.expr(0)
}
{
p.SetState(123)
p.Match(PlanParserT__3)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(124)
p.Match(PlanParserTHRESHOLD)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(125)
p.Match(PlanParserASSIGN)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(126)
p.Match(PlanParserIntegerConstant)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(127)
p.Match(PlanParserT__1)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case 25:
localctx = NewUnaryContext(p, localctx)
p.SetParserRuleContext(localctx)
_prevctx = localctx
{
p.SetState(129)
var _lt = p.GetTokenStream().LT(1)
localctx.(*UnaryContext).op = _lt
_la = p.GetTokenStream().LA(1)
if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&422225349967872) != 0) {
var _ri = p.GetErrorHandler().RecoverInline(p)
localctx.(*UnaryContext).op = _ri
} else {
p.GetErrorHandler().ReportMatch(p)
p.Consume()
}
}
{
p.SetState(130)
p.expr(25)
}
case 26:
localctx = NewJSONContainsContext(p, localctx)
p.SetParserRuleContext(localctx)
_prevctx = localctx
{
p.SetState(131)
_la = p.GetTokenStream().LA(1)
if !(_la == PlanParserJSONContains || _la == PlanParserArrayContains) {
p.GetErrorHandler().RecoverInline(p)
} else {
p.GetErrorHandler().ReportMatch(p)
p.Consume()
}
}
{
p.SetState(132)
p.Match(PlanParserT__0)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(133)
p.expr(0)
}
{
p.SetState(134)
p.Match(PlanParserT__3)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(135)
p.expr(0)
}
{
p.SetState(136)
p.Match(PlanParserT__1)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case 27:
localctx = NewJSONContainsAllContext(p, localctx)
p.SetParserRuleContext(localctx)
_prevctx = localctx
{
p.SetState(138)
_la = p.GetTokenStream().LA(1)
if !(_la == PlanParserJSONContainsAll || _la == PlanParserArrayContainsAll) {
p.GetErrorHandler().RecoverInline(p)
} else {
p.GetErrorHandler().ReportMatch(p)
p.Consume()
}
}
{
p.SetState(139)
p.Match(PlanParserT__0)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(140)
p.expr(0)
}
{
p.SetState(141)
p.Match(PlanParserT__3)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(142)
p.expr(0)
}
{
p.SetState(143)
p.Match(PlanParserT__1)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case 28:
localctx = NewJSONContainsAnyContext(p, localctx)
p.SetParserRuleContext(localctx)
_prevctx = localctx
{
p.SetState(145)
_la = p.GetTokenStream().LA(1)
if !(_la == PlanParserJSONContainsAny || _la == PlanParserArrayContainsAny) {
p.GetErrorHandler().RecoverInline(p)
} else {
p.GetErrorHandler().ReportMatch(p)
p.Consume()
}
}
{
p.SetState(146)
p.Match(PlanParserT__0)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(147)
p.expr(0)
}
{
p.SetState(148)
p.Match(PlanParserT__3)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(149)
p.expr(0)
}
{
p.SetState(150)
p.Match(PlanParserT__1)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case 29:
localctx = NewSpatialBinaryContext(p, localctx)
p.SetParserRuleContext(localctx)
_prevctx = localctx
{
p.SetState(152)
var _lt = p.GetTokenStream().LT(1)
localctx.(*SpatialBinaryContext).op = _lt
_la = p.GetTokenStream().LA(1)
if !((int64((_la-59)) & ^0x3f) == 0 && ((int64(1)<<(_la-59))&127) != 0) {
var _ri = p.GetErrorHandler().RecoverInline(p)
localctx.(*SpatialBinaryContext).op = _ri
} else {
p.GetErrorHandler().ReportMatch(p)
p.Consume()
}
}
{
p.SetState(153)
p.Match(PlanParserT__0)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(154)
p.FieldName()
}
{
p.SetState(155)
p.Match(PlanParserT__3)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(156)
p.expr(0)
}
{
p.SetState(157)
p.Match(PlanParserT__1)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case 30:
localctx = NewSTDWithinContext(p, localctx)
p.SetParserRuleContext(localctx)
_prevctx = localctx
{
p.SetState(159)
p.Match(PlanParserSTDWithin)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(160)
p.Match(PlanParserT__0)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(161)
p.FieldName()
}
{
p.SetState(162)
p.Match(PlanParserT__3)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(163)
p.expr(0)
}
{
p.SetState(164)
p.Match(PlanParserT__3)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(165)
p.expr(0)
}
{
p.SetState(166)
p.Match(PlanParserT__1)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case 31:
localctx = NewSTIsValidContext(p, localctx)
p.SetParserRuleContext(localctx)
_prevctx = localctx
{
p.SetState(168)
p.Match(PlanParserSTIsValid)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(169)
p.Match(PlanParserT__0)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(170)
p.FieldName()
}
{
p.SetState(171)
p.Match(PlanParserT__1)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case 32:
localctx = NewArrayLengthContext(p, localctx)
p.SetParserRuleContext(localctx)
_prevctx = localctx
{
p.SetState(173)
p.Match(PlanParserArrayLength)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(174)
p.Match(PlanParserT__0)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
p.SetState(179)
p.GetErrorHandler().Sync(p)
if p.HasError() {
goto errorExit
}
switch p.GetTokenStream().LA(1) {
case PlanParserTEXTMATCHFUZZY, PlanParserMATCH_ALL, PlanParserMATCH_ANY, PlanParserMATCH_LEAST, PlanParserMATCH_MOST, PlanParserMATCH_EXACT, PlanParserINTERVAL, PlanParserISO, PlanParserMINIMUM_SHOULD_MATCH, PlanParserTHRESHOLD, PlanParserElementFilter, PlanParserSTEuqals, PlanParserSTTouches, PlanParserSTOverlaps, PlanParserSTCrosses, PlanParserSTContains, PlanParserSTIntersects, PlanParserSTWithin, PlanParserSTDWithin, PlanParserSTIsValid, PlanParserIdentifier:
{
p.SetState(175)
p.FieldName()
}
case PlanParserJSONIdentifier:
{
p.SetState(176)
p.Match(PlanParserJSONIdentifier)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case PlanParserStructFieldIdentifier:
{
p.SetState(177)
p.Match(PlanParserStructFieldIdentifier)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case PlanParserStructSubFieldIdentifier:
{
p.SetState(178)
p.Match(PlanParserStructSubFieldIdentifier)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
default:
p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
goto errorExit
}
{
p.SetState(181)
p.Match(PlanParserT__1)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case 33:
localctx = NewMembershipMatchWithOptionContext(p, localctx)
p.SetParserRuleContext(localctx)
_prevctx = localctx
{
p.SetState(182)
var _m = p.Match(PlanParserIdentifier)
localctx.(*MembershipMatchWithOptionContext).function = _m
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(183)
p.Match(PlanParserT__0)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(184)
var _x = p.FieldReference()
localctx.(*MembershipMatchWithOptionContext).field = _x
}
{
p.SetState(185)
p.Match(PlanParserT__3)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(186)
p.expr(0)
}
{
p.SetState(187)
p.Match(PlanParserT__3)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(188)
var _m = p.Match(PlanParserIdentifier)
localctx.(*MembershipMatchWithOptionContext).option = _m
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(189)
p.Match(PlanParserASSIGN)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(190)
var _m = p.Match(PlanParserIdentifier)
localctx.(*MembershipMatchWithOptionContext).kind = _m
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(191)
p.Match(PlanParserT__1)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case 34:
localctx = NewCallContext(p, localctx)
p.SetParserRuleContext(localctx)
_prevctx = localctx
{
p.SetState(193)
p.Match(PlanParserIdentifier)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(194)
p.Match(PlanParserT__0)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
p.SetState(206)
p.GetErrorHandler().Sync(p)
if p.HasError() {
goto errorExit
}
_la = p.GetTokenStream().LA(1)
if ((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&-703674020036534) != 0) || ((int64((_la-64)) & ^0x3f) == 0 && ((int64(1)<<(_la-64))&32767) != 0) {
{
p.SetState(195)
p.expr(0)
}
p.SetState(200)
p.GetErrorHandler().Sync(p)
if p.HasError() {
goto errorExit
}
_alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 8, p.GetParserRuleContext())
if p.HasError() {
goto errorExit
}
for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
if _alt == 1 {
{
p.SetState(196)
p.Match(PlanParserT__3)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(197)
p.expr(0)
}
}
p.SetState(202)
p.GetErrorHandler().Sync(p)
if p.HasError() {
goto errorExit
}
_alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 8, p.GetParserRuleContext())
if p.HasError() {
goto errorExit
}
}
p.SetState(204)
p.GetErrorHandler().Sync(p)
if p.HasError() {
goto errorExit
}
_la = p.GetTokenStream().LA(1)
if _la == PlanParserT__3 {
{
p.SetState(203)
p.Match(PlanParserT__3)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
}
}
{
p.SetState(208)
p.Match(PlanParserT__1)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case 35:
localctx = NewIsNullContext(p, localctx)
p.SetParserRuleContext(localctx)
_prevctx = localctx
p.SetState(211)
p.GetErrorHandler().Sync(p)
if p.HasError() {
goto errorExit
}
switch p.GetTokenStream().LA(1) {
case PlanParserTEXTMATCHFUZZY, PlanParserMATCH_ALL, PlanParserMATCH_ANY, PlanParserMATCH_LEAST, PlanParserMATCH_MOST, PlanParserMATCH_EXACT, PlanParserINTERVAL, PlanParserISO, PlanParserMINIMUM_SHOULD_MATCH, PlanParserTHRESHOLD, PlanParserElementFilter, PlanParserSTEuqals, PlanParserSTTouches, PlanParserSTOverlaps, PlanParserSTCrosses, PlanParserSTContains, PlanParserSTIntersects, PlanParserSTWithin, PlanParserSTDWithin, PlanParserSTIsValid, PlanParserIdentifier:
{
p.SetState(209)
p.FieldName()
}
case PlanParserJSONIdentifier:
{
p.SetState(210)
p.Match(PlanParserJSONIdentifier)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
default:
p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
goto errorExit
}
{
p.SetState(213)
p.Match(PlanParserISNULL)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case 36:
localctx = NewIsNotNullContext(p, localctx)
p.SetParserRuleContext(localctx)
_prevctx = localctx
p.SetState(216)
p.GetErrorHandler().Sync(p)
if p.HasError() {
goto errorExit
}
switch p.GetTokenStream().LA(1) {
case PlanParserTEXTMATCHFUZZY, PlanParserMATCH_ALL, PlanParserMATCH_ANY, PlanParserMATCH_LEAST, PlanParserMATCH_MOST, PlanParserMATCH_EXACT, PlanParserINTERVAL, PlanParserISO, PlanParserMINIMUM_SHOULD_MATCH, PlanParserTHRESHOLD, PlanParserElementFilter, PlanParserSTEuqals, PlanParserSTTouches, PlanParserSTOverlaps, PlanParserSTCrosses, PlanParserSTContains, PlanParserSTIntersects, PlanParserSTWithin, PlanParserSTDWithin, PlanParserSTIsValid, PlanParserIdentifier:
{
p.SetState(214)
p.FieldName()
}
case PlanParserJSONIdentifier:
{
p.SetState(215)
p.Match(PlanParserJSONIdentifier)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
default:
p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
goto errorExit
}
{
p.SetState(218)
p.Match(PlanParserISNOTNULL)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case antlr.ATNInvalidAltNumber:
goto errorExit
}
p.GetParserRuleContext().SetStop(p.GetTokenStream().LT(-1))
p.SetState(291)
p.GetErrorHandler().Sync(p)
if p.HasError() {
goto errorExit
}
_alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 18, p.GetParserRuleContext())
if p.HasError() {
goto errorExit
}
for _alt != 2 && _alt != antlr.ATNInvalidAltNumber {
if _alt == 1 {
if p.GetParseListeners() != nil {
p.TriggerExitRuleEvent()
}
_prevctx = localctx
p.SetState(289)
p.GetErrorHandler().Sync(p)
if p.HasError() {
goto errorExit
}
switch p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 17, p.GetParserRuleContext()) {
case 1:
localctx = NewLikeContext(p, NewExprContext(p, _parentctx, _parentState))
p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr)
p.SetState(221)
if !(p.Precpred(p.GetParserRuleContext(), 36)) {
p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 36)", ""))
goto errorExit
}
{
p.SetState(222)
p.Match(PlanParserLIKE)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(223)
p.expr(37)
}
case 2:
localctx = NewRegexMatchContext(p, NewExprContext(p, _parentctx, _parentState))
p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr)
p.SetState(224)
if !(p.Precpred(p.GetParserRuleContext(), 35)) {
p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 35)", ""))
goto errorExit
}
{
p.SetState(225)
p.Match(PlanParserREGEXMATCH)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(226)
p.expr(36)
}
case 3:
localctx = NewRegexNotMatchContext(p, NewExprContext(p, _parentctx, _parentState))
p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr)
p.SetState(227)
if !(p.Precpred(p.GetParserRuleContext(), 34)) {
p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 34)", ""))
goto errorExit
}
{
p.SetState(228)
p.Match(PlanParserREGEXNOTMATCH)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(229)
p.expr(35)
}
case 4:
localctx = NewPowerContext(p, NewExprContext(p, _parentctx, _parentState))
p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr)
p.SetState(230)
if !(p.Precpred(p.GetParserRuleContext(), 26)) {
p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 26)", ""))
goto errorExit
}
{
p.SetState(231)
p.Match(PlanParserPOW)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(232)
p.expr(27)
}
case 5:
localctx = NewMulDivModContext(p, NewExprContext(p, _parentctx, _parentState))
p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr)
p.SetState(233)
if !(p.Precpred(p.GetParserRuleContext(), 24)) {
p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 24)", ""))
goto errorExit
}
{
p.SetState(234)
var _lt = p.GetTokenStream().LT(1)
localctx.(*MulDivModContext).op = _lt
_la = p.GetTokenStream().LA(1)
if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&120259084288) != 0) {
var _ri = p.GetErrorHandler().RecoverInline(p)
localctx.(*MulDivModContext).op = _ri
} else {
p.GetErrorHandler().ReportMatch(p)
p.Consume()
}
}
{
p.SetState(235)
p.expr(25)
}
case 6:
localctx = NewAddSubContext(p, NewExprContext(p, _parentctx, _parentState))
p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr)
p.SetState(236)
if !(p.Precpred(p.GetParserRuleContext(), 23)) {
p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 23)", ""))
goto errorExit
}
{
p.SetState(237)
var _lt = p.GetTokenStream().LT(1)
localctx.(*AddSubContext).op = _lt
_la = p.GetTokenStream().LA(1)
if !(_la == PlanParserADD || _la == PlanParserSUB) {
var _ri = p.GetErrorHandler().RecoverInline(p)
localctx.(*AddSubContext).op = _ri
} else {
p.GetErrorHandler().ReportMatch(p)
p.Consume()
}
}
{
p.SetState(238)
p.expr(24)
}
case 7:
localctx = NewShiftContext(p, NewExprContext(p, _parentctx, _parentState))
p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr)
p.SetState(239)
if !(p.Precpred(p.GetParserRuleContext(), 22)) {
p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 22)", ""))
goto errorExit
}
{
p.SetState(240)
var _lt = p.GetTokenStream().LT(1)
localctx.(*ShiftContext).op = _lt
_la = p.GetTokenStream().LA(1)
if !(_la == PlanParserSHL || _la == PlanParserSHR) {
var _ri = p.GetErrorHandler().RecoverInline(p)
localctx.(*ShiftContext).op = _ri
} else {
p.GetErrorHandler().ReportMatch(p)
p.Consume()
}
}
{
p.SetState(241)
p.expr(23)
}
case 8:
localctx = NewTermContext(p, NewExprContext(p, _parentctx, _parentState))
p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr)
p.SetState(242)
if !(p.Precpred(p.GetParserRuleContext(), 21)) {
p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 21)", ""))
goto errorExit
}
p.SetState(244)
p.GetErrorHandler().Sync(p)
if p.HasError() {
goto errorExit
}
_la = p.GetTokenStream().LA(1)
if _la == PlanParserNOT {
{
p.SetState(243)
var _m = p.Match(PlanParserNOT)
localctx.(*TermContext).op = _m
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
}
{
p.SetState(246)
p.Match(PlanParserIN)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(247)
p.expr(22)
}
case 9:
localctx = NewRangeContext(p, NewExprContext(p, _parentctx, _parentState))
p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr)
p.SetState(248)
if !(p.Precpred(p.GetParserRuleContext(), 11)) {
p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 11)", ""))
goto errorExit
}
{
p.SetState(249)
var _lt = p.GetTokenStream().LT(1)
localctx.(*RangeContext).op1 = _lt
_la = p.GetTokenStream().LA(1)
if !(_la == PlanParserLT || _la == PlanParserLE) {
var _ri = p.GetErrorHandler().RecoverInline(p)
localctx.(*RangeContext).op1 = _ri
} else {
p.GetErrorHandler().ReportMatch(p)
p.Consume()
}
}
p.SetState(254)
p.GetErrorHandler().Sync(p)
if p.HasError() {
goto errorExit
}
switch p.GetTokenStream().LA(1) {
case PlanParserTEXTMATCHFUZZY, PlanParserMATCH_ALL, PlanParserMATCH_ANY, PlanParserMATCH_LEAST, PlanParserMATCH_MOST, PlanParserMATCH_EXACT, PlanParserINTERVAL, PlanParserISO, PlanParserMINIMUM_SHOULD_MATCH, PlanParserTHRESHOLD, PlanParserElementFilter, PlanParserSTEuqals, PlanParserSTTouches, PlanParserSTOverlaps, PlanParserSTCrosses, PlanParserSTContains, PlanParserSTIntersects, PlanParserSTWithin, PlanParserSTDWithin, PlanParserSTIsValid, PlanParserIdentifier:
{
p.SetState(250)
p.FieldName()
}
case PlanParserJSONIdentifier:
{
p.SetState(251)
p.Match(PlanParserJSONIdentifier)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case PlanParserStructSubFieldIdentifier:
{
p.SetState(252)
p.Match(PlanParserStructSubFieldIdentifier)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case PlanParserStructIndexFieldIdentifier:
{
p.SetState(253)
p.Match(PlanParserStructIndexFieldIdentifier)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
default:
p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
goto errorExit
}
{
p.SetState(256)
var _lt = p.GetTokenStream().LT(1)
localctx.(*RangeContext).op2 = _lt
_la = p.GetTokenStream().LA(1)
if !(_la == PlanParserLT || _la == PlanParserLE) {
var _ri = p.GetErrorHandler().RecoverInline(p)
localctx.(*RangeContext).op2 = _ri
} else {
p.GetErrorHandler().ReportMatch(p)
p.Consume()
}
}
{
p.SetState(257)
p.expr(12)
}
case 10:
localctx = NewReverseRangeContext(p, NewExprContext(p, _parentctx, _parentState))
p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr)
p.SetState(258)
if !(p.Precpred(p.GetParserRuleContext(), 10)) {
p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 10)", ""))
goto errorExit
}
{
p.SetState(259)
var _lt = p.GetTokenStream().LT(1)
localctx.(*ReverseRangeContext).op1 = _lt
_la = p.GetTokenStream().LA(1)
if !(_la == PlanParserGT || _la == PlanParserGE) {
var _ri = p.GetErrorHandler().RecoverInline(p)
localctx.(*ReverseRangeContext).op1 = _ri
} else {
p.GetErrorHandler().ReportMatch(p)
p.Consume()
}
}
p.SetState(264)
p.GetErrorHandler().Sync(p)
if p.HasError() {
goto errorExit
}
switch p.GetTokenStream().LA(1) {
case PlanParserTEXTMATCHFUZZY, PlanParserMATCH_ALL, PlanParserMATCH_ANY, PlanParserMATCH_LEAST, PlanParserMATCH_MOST, PlanParserMATCH_EXACT, PlanParserINTERVAL, PlanParserISO, PlanParserMINIMUM_SHOULD_MATCH, PlanParserTHRESHOLD, PlanParserElementFilter, PlanParserSTEuqals, PlanParserSTTouches, PlanParserSTOverlaps, PlanParserSTCrosses, PlanParserSTContains, PlanParserSTIntersects, PlanParserSTWithin, PlanParserSTDWithin, PlanParserSTIsValid, PlanParserIdentifier:
{
p.SetState(260)
p.FieldName()
}
case PlanParserJSONIdentifier:
{
p.SetState(261)
p.Match(PlanParserJSONIdentifier)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case PlanParserStructSubFieldIdentifier:
{
p.SetState(262)
p.Match(PlanParserStructSubFieldIdentifier)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case PlanParserStructIndexFieldIdentifier:
{
p.SetState(263)
p.Match(PlanParserStructIndexFieldIdentifier)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
default:
p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
goto errorExit
}
{
p.SetState(266)
var _lt = p.GetTokenStream().LT(1)
localctx.(*ReverseRangeContext).op2 = _lt
_la = p.GetTokenStream().LA(1)
if !(_la == PlanParserGT || _la == PlanParserGE) {
var _ri = p.GetErrorHandler().RecoverInline(p)
localctx.(*ReverseRangeContext).op2 = _ri
} else {
p.GetErrorHandler().ReportMatch(p)
p.Consume()
}
}
{
p.SetState(267)
p.expr(11)
}
case 11:
localctx = NewRelationalContext(p, NewExprContext(p, _parentctx, _parentState))
p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr)
p.SetState(268)
if !(p.Precpred(p.GetParserRuleContext(), 9)) {
p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 9)", ""))
goto errorExit
}
{
p.SetState(269)
var _lt = p.GetTokenStream().LT(1)
localctx.(*RelationalContext).op = _lt
_la = p.GetTokenStream().LA(1)
if !((int64(_la) & ^0x3f) == 0 && ((int64(1)<<_la)&3840) != 0) {
var _ri = p.GetErrorHandler().RecoverInline(p)
localctx.(*RelationalContext).op = _ri
} else {
p.GetErrorHandler().ReportMatch(p)
p.Consume()
}
}
{
p.SetState(270)
p.expr(10)
}
case 12:
localctx = NewEqualityContext(p, NewExprContext(p, _parentctx, _parentState))
p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr)
p.SetState(271)
if !(p.Precpred(p.GetParserRuleContext(), 8)) {
p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 8)", ""))
goto errorExit
}
{
p.SetState(272)
var _lt = p.GetTokenStream().LT(1)
localctx.(*EqualityContext).op = _lt
_la = p.GetTokenStream().LA(1)
if !(_la == PlanParserEQ || _la == PlanParserNE) {
var _ri = p.GetErrorHandler().RecoverInline(p)
localctx.(*EqualityContext).op = _ri
} else {
p.GetErrorHandler().ReportMatch(p)
p.Consume()
}
}
{
p.SetState(273)
p.expr(9)
}
case 13:
localctx = NewBitAndContext(p, NewExprContext(p, _parentctx, _parentState))
p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr)
p.SetState(274)
if !(p.Precpred(p.GetParserRuleContext(), 7)) {
p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 7)", ""))
goto errorExit
}
{
p.SetState(275)
p.Match(PlanParserBAND)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(276)
p.expr(8)
}
case 14:
localctx = NewBitXorContext(p, NewExprContext(p, _parentctx, _parentState))
p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr)
p.SetState(277)
if !(p.Precpred(p.GetParserRuleContext(), 6)) {
p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 6)", ""))
goto errorExit
}
{
p.SetState(278)
p.Match(PlanParserBXOR)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(279)
p.expr(7)
}
case 15:
localctx = NewBitOrContext(p, NewExprContext(p, _parentctx, _parentState))
p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr)
p.SetState(280)
if !(p.Precpred(p.GetParserRuleContext(), 5)) {
p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 5)", ""))
goto errorExit
}
{
p.SetState(281)
p.Match(PlanParserBOR)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(282)
p.expr(6)
}
case 16:
localctx = NewLogicalAndContext(p, NewExprContext(p, _parentctx, _parentState))
p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr)
p.SetState(283)
if !(p.Precpred(p.GetParserRuleContext(), 4)) {
p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 4)", ""))
goto errorExit
}
{
p.SetState(284)
p.Match(PlanParserAND)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(285)
p.expr(5)
}
case 17:
localctx = NewLogicalOrContext(p, NewExprContext(p, _parentctx, _parentState))
p.PushNewRecursionContext(localctx, _startState, PlanParserRULE_expr)
p.SetState(286)
if !(p.Precpred(p.GetParserRuleContext(), 3)) {
p.SetError(antlr.NewFailedPredicateException(p, "p.Precpred(p.GetParserRuleContext(), 3)", ""))
goto errorExit
}
{
p.SetState(287)
p.Match(PlanParserOR)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(288)
p.expr(4)
}
case antlr.ATNInvalidAltNumber:
goto errorExit
}
}
p.SetState(293)
p.GetErrorHandler().Sync(p)
if p.HasError() {
goto errorExit
}
_alt = p.GetInterpreter().AdaptivePredict(p.BaseParser, p.GetTokenStream(), 18, p.GetParserRuleContext())
if p.HasError() {
goto errorExit
}
}
errorExit:
if p.HasError() {
v := p.GetError()
localctx.SetException(v)
p.GetErrorHandler().ReportError(p, v)
p.GetErrorHandler().Recover(p, v)
p.SetError(nil)
}
p.UnrollRecursionContexts(_parentctx)
return localctx
goto errorExit // Trick to prevent compiler error if the label is not used
}
// IFieldNameContext is an interface to support dynamic dispatch.
type IFieldNameContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// Getter signatures
Identifier() antlr.TerminalNode
ISO() antlr.TerminalNode
INTERVAL() antlr.TerminalNode
MINIMUM_SHOULD_MATCH() antlr.TerminalNode
THRESHOLD() antlr.TerminalNode
TEXTMATCHFUZZY() antlr.TerminalNode
MATCH_ALL() antlr.TerminalNode
MATCH_ANY() antlr.TerminalNode
MATCH_LEAST() antlr.TerminalNode
MATCH_MOST() antlr.TerminalNode
MATCH_EXACT() antlr.TerminalNode
ElementFilter() antlr.TerminalNode
STEuqals() antlr.TerminalNode
STTouches() antlr.TerminalNode
STOverlaps() antlr.TerminalNode
STCrosses() antlr.TerminalNode
STContains() antlr.TerminalNode
STIntersects() antlr.TerminalNode
STWithin() antlr.TerminalNode
STDWithin() antlr.TerminalNode
STIsValid() antlr.TerminalNode
// IsFieldNameContext differentiates from other interfaces.
IsFieldNameContext()
}
type FieldNameContext struct {
antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyFieldNameContext() *FieldNameContext {
var p = new(FieldNameContext)
antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
p.RuleIndex = PlanParserRULE_fieldName
return p
}
func InitEmptyFieldNameContext(p *FieldNameContext) {
antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
p.RuleIndex = PlanParserRULE_fieldName
}
func (*FieldNameContext) IsFieldNameContext() {}
func NewFieldNameContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *FieldNameContext {
var p = new(FieldNameContext)
antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)
p.parser = parser
p.RuleIndex = PlanParserRULE_fieldName
return p
}
func (s *FieldNameContext) GetParser() antlr.Parser { return s.parser }
func (s *FieldNameContext) Identifier() antlr.TerminalNode {
return s.GetToken(PlanParserIdentifier, 0)
}
func (s *FieldNameContext) ISO() antlr.TerminalNode {
return s.GetToken(PlanParserISO, 0)
}
func (s *FieldNameContext) INTERVAL() antlr.TerminalNode {
return s.GetToken(PlanParserINTERVAL, 0)
}
func (s *FieldNameContext) MINIMUM_SHOULD_MATCH() antlr.TerminalNode {
return s.GetToken(PlanParserMINIMUM_SHOULD_MATCH, 0)
}
func (s *FieldNameContext) THRESHOLD() antlr.TerminalNode {
return s.GetToken(PlanParserTHRESHOLD, 0)
}
func (s *FieldNameContext) TEXTMATCHFUZZY() antlr.TerminalNode {
return s.GetToken(PlanParserTEXTMATCHFUZZY, 0)
}
func (s *FieldNameContext) MATCH_ALL() antlr.TerminalNode {
return s.GetToken(PlanParserMATCH_ALL, 0)
}
func (s *FieldNameContext) MATCH_ANY() antlr.TerminalNode {
return s.GetToken(PlanParserMATCH_ANY, 0)
}
func (s *FieldNameContext) MATCH_LEAST() antlr.TerminalNode {
return s.GetToken(PlanParserMATCH_LEAST, 0)
}
func (s *FieldNameContext) MATCH_MOST() antlr.TerminalNode {
return s.GetToken(PlanParserMATCH_MOST, 0)
}
func (s *FieldNameContext) MATCH_EXACT() antlr.TerminalNode {
return s.GetToken(PlanParserMATCH_EXACT, 0)
}
func (s *FieldNameContext) ElementFilter() antlr.TerminalNode {
return s.GetToken(PlanParserElementFilter, 0)
}
func (s *FieldNameContext) STEuqals() antlr.TerminalNode {
return s.GetToken(PlanParserSTEuqals, 0)
}
func (s *FieldNameContext) STTouches() antlr.TerminalNode {
return s.GetToken(PlanParserSTTouches, 0)
}
func (s *FieldNameContext) STOverlaps() antlr.TerminalNode {
return s.GetToken(PlanParserSTOverlaps, 0)
}
func (s *FieldNameContext) STCrosses() antlr.TerminalNode {
return s.GetToken(PlanParserSTCrosses, 0)
}
func (s *FieldNameContext) STContains() antlr.TerminalNode {
return s.GetToken(PlanParserSTContains, 0)
}
func (s *FieldNameContext) STIntersects() antlr.TerminalNode {
return s.GetToken(PlanParserSTIntersects, 0)
}
func (s *FieldNameContext) STWithin() antlr.TerminalNode {
return s.GetToken(PlanParserSTWithin, 0)
}
func (s *FieldNameContext) STDWithin() antlr.TerminalNode {
return s.GetToken(PlanParserSTDWithin, 0)
}
func (s *FieldNameContext) STIsValid() antlr.TerminalNode {
return s.GetToken(PlanParserSTIsValid, 0)
}
func (s *FieldNameContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *FieldNameContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *FieldNameContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitFieldName(s)
default:
return t.VisitChildren(s)
}
}
func (p *PlanParser) FieldName() (localctx IFieldNameContext) {
localctx = NewFieldNameContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 2, PlanParserRULE_fieldName)
var _la int
p.EnterOuterAlt(localctx, 1)
{
p.SetState(294)
_la = p.GetTokenStream().LA(1)
if !((int64((_la-17)) & ^0x3f) == 0 && ((int64(1)<<(_la-17))&20263999299915769) != 0) {
p.GetErrorHandler().RecoverInline(p)
} else {
p.GetErrorHandler().ReportMatch(p)
p.Consume()
}
}
errorExit:
if p.HasError() {
v := p.GetError()
localctx.SetException(v)
p.GetErrorHandler().ReportError(p, v)
p.GetErrorHandler().Recover(p, v)
p.SetError(nil)
}
p.ExitRule()
return localctx
goto errorExit // Trick to prevent compiler error if the label is not used
}
// IFieldReferenceContext is an interface to support dynamic dispatch.
type IFieldReferenceContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// Getter signatures
FieldName() IFieldNameContext
Meta() antlr.TerminalNode
JSONIdentifier() antlr.TerminalNode
StructFieldIdentifier() antlr.TerminalNode
StructIndexFieldIdentifier() antlr.TerminalNode
StructSubFieldIdentifier() antlr.TerminalNode
// IsFieldReferenceContext differentiates from other interfaces.
IsFieldReferenceContext()
}
type FieldReferenceContext struct {
antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyFieldReferenceContext() *FieldReferenceContext {
var p = new(FieldReferenceContext)
antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
p.RuleIndex = PlanParserRULE_fieldReference
return p
}
func InitEmptyFieldReferenceContext(p *FieldReferenceContext) {
antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
p.RuleIndex = PlanParserRULE_fieldReference
}
func (*FieldReferenceContext) IsFieldReferenceContext() {}
func NewFieldReferenceContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *FieldReferenceContext {
var p = new(FieldReferenceContext)
antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)
p.parser = parser
p.RuleIndex = PlanParserRULE_fieldReference
return p
}
func (s *FieldReferenceContext) GetParser() antlr.Parser { return s.parser }
func (s *FieldReferenceContext) FieldName() IFieldNameContext {
var t antlr.RuleContext
for _, ctx := range s.GetChildren() {
if _, ok := ctx.(IFieldNameContext); ok {
t = ctx.(antlr.RuleContext)
break
}
}
if t == nil {
return nil
}
return t.(IFieldNameContext)
}
func (s *FieldReferenceContext) Meta() antlr.TerminalNode {
return s.GetToken(PlanParserMeta, 0)
}
func (s *FieldReferenceContext) JSONIdentifier() antlr.TerminalNode {
return s.GetToken(PlanParserJSONIdentifier, 0)
}
func (s *FieldReferenceContext) StructFieldIdentifier() antlr.TerminalNode {
return s.GetToken(PlanParserStructFieldIdentifier, 0)
}
func (s *FieldReferenceContext) StructIndexFieldIdentifier() antlr.TerminalNode {
return s.GetToken(PlanParserStructIndexFieldIdentifier, 0)
}
func (s *FieldReferenceContext) StructSubFieldIdentifier() antlr.TerminalNode {
return s.GetToken(PlanParserStructSubFieldIdentifier, 0)
}
func (s *FieldReferenceContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *FieldReferenceContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *FieldReferenceContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitFieldReference(s)
default:
return t.VisitChildren(s)
}
}
func (p *PlanParser) FieldReference() (localctx IFieldReferenceContext) {
localctx = NewFieldReferenceContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 4, PlanParserRULE_fieldReference)
p.SetState(302)
p.GetErrorHandler().Sync(p)
if p.HasError() {
goto errorExit
}
switch p.GetTokenStream().LA(1) {
case PlanParserTEXTMATCHFUZZY, PlanParserMATCH_ALL, PlanParserMATCH_ANY, PlanParserMATCH_LEAST, PlanParserMATCH_MOST, PlanParserMATCH_EXACT, PlanParserINTERVAL, PlanParserISO, PlanParserMINIMUM_SHOULD_MATCH, PlanParserTHRESHOLD, PlanParserElementFilter, PlanParserSTEuqals, PlanParserSTTouches, PlanParserSTOverlaps, PlanParserSTCrosses, PlanParserSTContains, PlanParserSTIntersects, PlanParserSTWithin, PlanParserSTDWithin, PlanParserSTIsValid, PlanParserIdentifier:
p.EnterOuterAlt(localctx, 1)
{
p.SetState(296)
p.FieldName()
}
case PlanParserMeta:
p.EnterOuterAlt(localctx, 2)
{
p.SetState(297)
p.Match(PlanParserMeta)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case PlanParserJSONIdentifier:
p.EnterOuterAlt(localctx, 3)
{
p.SetState(298)
p.Match(PlanParserJSONIdentifier)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case PlanParserStructFieldIdentifier:
p.EnterOuterAlt(localctx, 4)
{
p.SetState(299)
p.Match(PlanParserStructFieldIdentifier)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case PlanParserStructIndexFieldIdentifier:
p.EnterOuterAlt(localctx, 5)
{
p.SetState(300)
p.Match(PlanParserStructIndexFieldIdentifier)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
case PlanParserStructSubFieldIdentifier:
p.EnterOuterAlt(localctx, 6)
{
p.SetState(301)
p.Match(PlanParserStructSubFieldIdentifier)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
default:
p.SetError(antlr.NewNoViableAltException(p, nil, nil, nil, nil, nil))
goto errorExit
}
errorExit:
if p.HasError() {
v := p.GetError()
localctx.SetException(v)
p.GetErrorHandler().ReportError(p, v)
p.GetErrorHandler().Recover(p, v)
p.SetError(nil)
}
p.ExitRule()
return localctx
goto errorExit // Trick to prevent compiler error if the label is not used
}
// ITextMatchOptionContext is an interface to support dynamic dispatch.
type ITextMatchOptionContext interface {
antlr.ParserRuleContext
// GetParser returns the parser.
GetParser() antlr.Parser
// Getter signatures
MINIMUM_SHOULD_MATCH() antlr.TerminalNode
ASSIGN() antlr.TerminalNode
IntegerConstant() antlr.TerminalNode
// IsTextMatchOptionContext differentiates from other interfaces.
IsTextMatchOptionContext()
}
type TextMatchOptionContext struct {
antlr.BaseParserRuleContext
parser antlr.Parser
}
func NewEmptyTextMatchOptionContext() *TextMatchOptionContext {
var p = new(TextMatchOptionContext)
antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
p.RuleIndex = PlanParserRULE_textMatchOption
return p
}
func InitEmptyTextMatchOptionContext(p *TextMatchOptionContext) {
antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, nil, -1)
p.RuleIndex = PlanParserRULE_textMatchOption
}
func (*TextMatchOptionContext) IsTextMatchOptionContext() {}
func NewTextMatchOptionContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *TextMatchOptionContext {
var p = new(TextMatchOptionContext)
antlr.InitBaseParserRuleContext(&p.BaseParserRuleContext, parent, invokingState)
p.parser = parser
p.RuleIndex = PlanParserRULE_textMatchOption
return p
}
func (s *TextMatchOptionContext) GetParser() antlr.Parser { return s.parser }
func (s *TextMatchOptionContext) MINIMUM_SHOULD_MATCH() antlr.TerminalNode {
return s.GetToken(PlanParserMINIMUM_SHOULD_MATCH, 0)
}
func (s *TextMatchOptionContext) ASSIGN() antlr.TerminalNode {
return s.GetToken(PlanParserASSIGN, 0)
}
func (s *TextMatchOptionContext) IntegerConstant() antlr.TerminalNode {
return s.GetToken(PlanParserIntegerConstant, 0)
}
func (s *TextMatchOptionContext) GetRuleContext() antlr.RuleContext {
return s
}
func (s *TextMatchOptionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string {
return antlr.TreesStringTree(s, ruleNames, recog)
}
func (s *TextMatchOptionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} {
switch t := visitor.(type) {
case PlanVisitor:
return t.VisitTextMatchOption(s)
default:
return t.VisitChildren(s)
}
}
func (p *PlanParser) TextMatchOption() (localctx ITextMatchOptionContext) {
localctx = NewTextMatchOptionContext(p, p.GetParserRuleContext(), p.GetState())
p.EnterRule(localctx, 6, PlanParserRULE_textMatchOption)
p.EnterOuterAlt(localctx, 1)
{
p.SetState(304)
p.Match(PlanParserMINIMUM_SHOULD_MATCH)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(305)
p.Match(PlanParserASSIGN)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
{
p.SetState(306)
p.Match(PlanParserIntegerConstant)
if p.HasError() {
// Recognition error - abort rule
goto errorExit
}
}
errorExit:
if p.HasError() {
v := p.GetError()
localctx.SetException(v)
p.GetErrorHandler().ReportError(p, v)
p.GetErrorHandler().Recover(p, v)
p.SetError(nil)
}
p.ExitRule()
return localctx
goto errorExit // Trick to prevent compiler error if the label is not used
}
func (p *PlanParser) Sempred(localctx antlr.RuleContext, ruleIndex, predIndex int) bool {
switch ruleIndex {
case 0:
var t *ExprContext = nil
if localctx != nil {
t = localctx.(*ExprContext)
}
return p.Expr_Sempred(t, predIndex)
default:
panic("No predicate with index: " + fmt.Sprint(ruleIndex))
}
}
func (p *PlanParser) Expr_Sempred(localctx antlr.RuleContext, predIndex int) bool {
switch predIndex {
case 0:
return p.Precpred(p.GetParserRuleContext(), 36)
case 1:
return p.Precpred(p.GetParserRuleContext(), 35)
case 2:
return p.Precpred(p.GetParserRuleContext(), 34)
case 3:
return p.Precpred(p.GetParserRuleContext(), 26)
case 4:
return p.Precpred(p.GetParserRuleContext(), 24)
case 5:
return p.Precpred(p.GetParserRuleContext(), 23)
case 6:
return p.Precpred(p.GetParserRuleContext(), 22)
case 7:
return p.Precpred(p.GetParserRuleContext(), 21)
case 8:
return p.Precpred(p.GetParserRuleContext(), 11)
case 9:
return p.Precpred(p.GetParserRuleContext(), 10)
case 10:
return p.Precpred(p.GetParserRuleContext(), 9)
case 11:
return p.Precpred(p.GetParserRuleContext(), 8)
case 12:
return p.Precpred(p.GetParserRuleContext(), 7)
case 13:
return p.Precpred(p.GetParserRuleContext(), 6)
case 14:
return p.Precpred(p.GetParserRuleContext(), 5)
case 15:
return p.Precpred(p.GetParserRuleContext(), 4)
case 16:
return p.Precpred(p.GetParserRuleContext(), 3)
default:
panic("No predicate with index: " + fmt.Sprint(predIndex))
}
}