Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: basic Redis grammar, parseRedisQueryWithoutCursor function, tests #207

Merged
merged 9 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
"target": "./src/autocomplete/databases/yql/**/*",
"from": "./src/autocomplete/databases/!(yql)/**/*"
},
{
"target": "./src/autocomplete/databases/redis/**/*",
"from": "./src/autocomplete/databases/!(redis)/**/*"
}
]
}]
}
Expand Down
2 changes: 1 addition & 1 deletion build.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {build} from 'esbuild';

const databases = ['clickhouse', 'mysql', 'postgresql', 'yql'];
const databases = ['clickhouse', 'mysql', 'postgresql', 'yql', 'redis'];

build({
external: ['antlr4ng', 'antlr4-c3'],
Expand Down
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"./clickhouse": "./dist/databases/clickhouse/index.js",
"./mysql": "./dist/databases/mysql/index.js",
"./postgresql": "./dist/databases/postgresql/index.js",
"./yql": "./dist/databases/yql/index.js"
"./yql": "./dist/databases/yql/index.js",
"./redis": "./dist/databases/redis/index.js"
},
"typesVersions": {
"*": {
Expand All @@ -31,6 +32,9 @@
"postgresql": [
"./dist/types/databases/postgresql/index.d.ts"
],
"redis": [
"./dist/types/databases/redis/index.d.ts"
],
"shared": [
"./dist/types/shared/index.d.ts"
]
Expand All @@ -55,6 +59,7 @@
"generate:postgresql": "rimraf src/autocomplete/databases/postgresql/generated && antlr4ng -Dlanguage=TypeScript -o src/autocomplete/databases/postgresql/generated/ -visitor -no-listener -Xexact-output-dir src/autocomplete/databases/postgresql/grammar/PostgreSqlLexer.g4 src/autocomplete/databases/postgresql/grammar/PostgreSqlParser.g4 && bash scripts/patch-generated.sh postgresql",
"generate:clickhouse": "rimraf src/autocomplete/databases/clickhouse/generated && antlr4ng -Dlanguage=TypeScript -o src/autocomplete/databases/clickhouse/generated/ -visitor -no-listener -Xexact-output-dir src/autocomplete/databases/clickhouse/grammar/ClickHouseLexer.g4 src/autocomplete/databases/clickhouse/grammar/ClickHouseParser.g4 && bash scripts/patch-generated.sh clickhouse",
"generate:yql": "rimraf src/autocomplete/databases/yql/generated && antlr4ng -Dlanguage=TypeScript -o src/autocomplete/databases/yql/generated/ -visitor -no-listener -Xexact-output-dir src/autocomplete/databases/yql/grammar/YQL.g4 && bash scripts/patch-generated.sh yql",
"generate:redis": "rimraf src/autocomplete/databases/redis/generated && antlr4ng -Dlanguage=TypeScript -o src/autocomplete/databases/redis/generated/ -visitor -no-listener -Xexact-output-dir src/autocomplete/databases/redis/grammar/RedisLexer.g4 src/autocomplete/databases/redis/grammar/RedisParser.g4 && bash scripts/patch-generated.sh redis",
"test": "node --experimental-vm-modules ./node_modules/.bin/jest --verbose src",
"build": "rimraf dist && node build.js && tsc -p tsconfig.build.json --declarationDir dist/types",
"prepublishOnly": "npm run build"
Expand Down
5 changes: 4 additions & 1 deletion scripts/patch-generated.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
DIALECT=$1

# Check that dialect is correct
if [ "$DIALECT" != "mysql" ] && [ "$DIALECT" != "postgresql" ] && [ "$DIALECT" != "clickhouse" ] && [ "$DIALECT" != "yql" ]
if [ "$DIALECT" != "mysql" ] && [ "$DIALECT" != "postgresql" ] && [ "$DIALECT" != "clickhouse" ] && [ "$DIALECT" != "yql" ] && [ "$DIALECT" != "redis" ]
then
echo "dialect '$DIALECT' is not supported"
exit 0
Expand All @@ -17,6 +17,9 @@ then
elif [ "$DIALECT" == "yql" ]
then
FILE_PREFIX=src/autocomplete/databases/$DIALECT/generated/YQL
elif [ "$DIALECT" == "redis" ]
then
FILE_PREFIX=src/autocomplete/databases/$DIALECT/generated/Redis
else
FILE_PREFIX=src/autocomplete/databases/$DIALECT/generated/ClickHouse
fi
Expand Down
4 changes: 2 additions & 2 deletions src/autocomplete/databases/clickhouse/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function parseClickHouseQueryWithoutCursor(
return parseQueryWithoutCursor(
clickHouseAutocompleteData.Lexer,
clickHouseAutocompleteData.Parser,
clickHouseAutocompleteData.tokenDictionary,
clickHouseAutocompleteData.tokenDictionary.SPACE,
clickHouseAutocompleteData.getParseTree,
query,
);
Expand All @@ -32,7 +32,7 @@ export function parseClickHouseQuery(
return parseQuery(
clickHouseAutocompleteData.Lexer,
clickHouseAutocompleteData.Parser,
clickHouseAutocompleteData.tokenDictionary,
clickHouseAutocompleteData.tokenDictionary.SPACE,
clickHouseAutocompleteData.ignoredTokens,
clickHouseAutocompleteData.rulesToVisit,
clickHouseAutocompleteData.getParseTree,
Expand Down
4 changes: 2 additions & 2 deletions src/autocomplete/databases/mysql/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function parseMySqlQueryWithoutCursor(
return parseQueryWithoutCursor(
mySqlAutocompleteData.Lexer,
mySqlAutocompleteData.Parser,
mySqlAutocompleteData.tokenDictionary,
mySqlAutocompleteData.tokenDictionary.SPACE,
mySqlAutocompleteData.getParseTree,
query,
);
Expand All @@ -33,7 +33,7 @@ export function parseMySqlQuery(query: string, cursor: CursorPosition): MySqlAut
return parseQuery(
mySqlAutocompleteData.Lexer,
mySqlAutocompleteData.Parser,
mySqlAutocompleteData.tokenDictionary,
mySqlAutocompleteData.tokenDictionary.SPACE,
mySqlAutocompleteData.ignoredTokens,
mySqlAutocompleteData.rulesToVisit,
mySqlAutocompleteData.getParseTree,
Expand Down
4 changes: 2 additions & 2 deletions src/autocomplete/databases/postgresql/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function parsePostgreSqlQueryWithoutCursor(
return parseQueryWithoutCursor(
postgreSqlAutocompleteData.Lexer,
postgreSqlAutocompleteData.Parser,
postgreSqlAutocompleteData.tokenDictionary,
postgreSqlAutocompleteData.tokenDictionary.SPACE,
postgreSqlAutocompleteData.getParseTree,
query,
);
Expand All @@ -37,7 +37,7 @@ export function parsePostgreSqlQuery(
return parseQuery(
postgreSqlAutocompleteData.Lexer,
postgreSqlAutocompleteData.Parser,
postgreSqlAutocompleteData.tokenDictionary,
postgreSqlAutocompleteData.tokenDictionary.SPACE,
postgreSqlAutocompleteData.ignoredTokens,
postgreSqlAutocompleteData.rulesToVisit,
postgreSqlAutocompleteData.getParseTree,
Expand Down
72 changes: 72 additions & 0 deletions src/autocomplete/databases/redis/generated/RedisLexer.interp
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
token literal names:
null
null
null
'SET'
'GET'
'INCR'
'DECR'
'NX'
'XX'
'EX'
'PX'
'EXAT'
'PXAT'
'KEEPTTL'
'\''
'"'
null
null

token symbolic names:
null
SPACE
NEWLINE
SET
GET
INCR
DECR
NX
XX
EX
PX
EXAT
PXAT
KEEPTTL
SINGLE_QUOTE
DOUBLE_QUOTE
DECIMAL_LITERAL
IDENTIFIER

rule names:
SPACE
NEWLINE
SET
GET
INCR
DECR
NX
XX
EX
PX
EXAT
PXAT
KEEPTTL
SINGLE_QUOTE
DOUBLE_QUOTE
DECIMAL_DIGIT
DECIMAL_LITERAL
DOUBLE_QUOTE_STRING
SINGLE_QUOTE_STRING
BASE_IDENTIFIER
IDENTIFIER

channel names:
DEFAULT_TOKEN_CHANNEL
HIDDEN

mode names:
DEFAULT_MODE

atn:
[4, 0, 17, 148, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 1, 0, 4, 0, 45, 8, 0, 11, 0, 12, 0, 46, 1, 0, 1, 0, 1, 1, 1, 1, 3, 1, 53, 8, 1, 1, 1, 3, 1, 56, 8, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 14, 1, 14, 1, 15, 1, 15, 1, 16, 4, 16, 113, 8, 16, 11, 16, 12, 16, 114, 1, 17, 1, 17, 1, 17, 1, 17, 5, 17, 121, 8, 17, 10, 17, 12, 17, 124, 9, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 5, 18, 132, 8, 18, 10, 18, 12, 18, 135, 9, 18, 1, 18, 1, 18, 1, 19, 4, 19, 140, 8, 19, 11, 19, 12, 19, 141, 1, 20, 1, 20, 1, 20, 3, 20, 147, 8, 20, 0, 0, 21, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 0, 33, 16, 35, 0, 37, 0, 39, 0, 41, 17, 1, 0, 19, 2, 0, 9, 9, 32, 32, 2, 0, 83, 83, 115, 115, 2, 0, 69, 69, 101, 101, 2, 0, 84, 84, 116, 116, 2, 0, 71, 71, 103, 103, 2, 0, 73, 73, 105, 105, 2, 0, 78, 78, 110, 110, 2, 0, 67, 67, 99, 99, 2, 0, 82, 82, 114, 114, 2, 0, 68, 68, 100, 100, 2, 0, 88, 88, 120, 120, 2, 0, 80, 80, 112, 112, 2, 0, 65, 65, 97, 97, 2, 0, 75, 75, 107, 107, 2, 0, 76, 76, 108, 108, 1, 0, 48, 57, 4, 0, 10, 10, 13, 13, 34, 34, 92, 92, 4, 0, 10, 10, 13, 13, 39, 39, 92, 92, 5, 0, 9, 10, 13, 13, 32, 32, 34, 34, 39, 39, 154, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 1, 44, 1, 0, 0, 0, 3, 55, 1, 0, 0, 0, 5, 57, 1, 0, 0, 0, 7, 61, 1, 0, 0, 0, 9, 65, 1, 0, 0, 0, 11, 70, 1, 0, 0, 0, 13, 75, 1, 0, 0, 0, 15, 78, 1, 0, 0, 0, 17, 81, 1, 0, 0, 0, 19, 84, 1, 0, 0, 0, 21, 87, 1, 0, 0, 0, 23, 92, 1, 0, 0, 0, 25, 97, 1, 0, 0, 0, 27, 105, 1, 0, 0, 0, 29, 107, 1, 0, 0, 0, 31, 109, 1, 0, 0, 0, 33, 112, 1, 0, 0, 0, 35, 116, 1, 0, 0, 0, 37, 127, 1, 0, 0, 0, 39, 139, 1, 0, 0, 0, 41, 146, 1, 0, 0, 0, 43, 45, 7, 0, 0, 0, 44, 43, 1, 0, 0, 0, 45, 46, 1, 0, 0, 0, 46, 44, 1, 0, 0, 0, 46, 47, 1, 0, 0, 0, 47, 48, 1, 0, 0, 0, 48, 49, 6, 0, 0, 0, 49, 2, 1, 0, 0, 0, 50, 52, 5, 13, 0, 0, 51, 53, 5, 10, 0, 0, 52, 51, 1, 0, 0, 0, 52, 53, 1, 0, 0, 0, 53, 56, 1, 0, 0, 0, 54, 56, 5, 10, 0, 0, 55, 50, 1, 0, 0, 0, 55, 54, 1, 0, 0, 0, 56, 4, 1, 0, 0, 0, 57, 58, 7, 1, 0, 0, 58, 59, 7, 2, 0, 0, 59, 60, 7, 3, 0, 0, 60, 6, 1, 0, 0, 0, 61, 62, 7, 4, 0, 0, 62, 63, 7, 2, 0, 0, 63, 64, 7, 3, 0, 0, 64, 8, 1, 0, 0, 0, 65, 66, 7, 5, 0, 0, 66, 67, 7, 6, 0, 0, 67, 68, 7, 7, 0, 0, 68, 69, 7, 8, 0, 0, 69, 10, 1, 0, 0, 0, 70, 71, 7, 9, 0, 0, 71, 72, 7, 2, 0, 0, 72, 73, 7, 7, 0, 0, 73, 74, 7, 8, 0, 0, 74, 12, 1, 0, 0, 0, 75, 76, 7, 6, 0, 0, 76, 77, 7, 10, 0, 0, 77, 14, 1, 0, 0, 0, 78, 79, 7, 10, 0, 0, 79, 80, 7, 10, 0, 0, 80, 16, 1, 0, 0, 0, 81, 82, 7, 2, 0, 0, 82, 83, 7, 10, 0, 0, 83, 18, 1, 0, 0, 0, 84, 85, 7, 11, 0, 0, 85, 86, 7, 10, 0, 0, 86, 20, 1, 0, 0, 0, 87, 88, 7, 2, 0, 0, 88, 89, 7, 10, 0, 0, 89, 90, 7, 12, 0, 0, 90, 91, 7, 3, 0, 0, 91, 22, 1, 0, 0, 0, 92, 93, 7, 11, 0, 0, 93, 94, 7, 10, 0, 0, 94, 95, 7, 12, 0, 0, 95, 96, 7, 3, 0, 0, 96, 24, 1, 0, 0, 0, 97, 98, 7, 13, 0, 0, 98, 99, 7, 2, 0, 0, 99, 100, 7, 2, 0, 0, 100, 101, 7, 11, 0, 0, 101, 102, 7, 3, 0, 0, 102, 103, 7, 3, 0, 0, 103, 104, 7, 14, 0, 0, 104, 26, 1, 0, 0, 0, 105, 106, 5, 39, 0, 0, 106, 28, 1, 0, 0, 0, 107, 108, 5, 34, 0, 0, 108, 30, 1, 0, 0, 0, 109, 110, 7, 15, 0, 0, 110, 32, 1, 0, 0, 0, 111, 113, 3, 31, 15, 0, 112, 111, 1, 0, 0, 0, 113, 114, 1, 0, 0, 0, 114, 112, 1, 0, 0, 0, 114, 115, 1, 0, 0, 0, 115, 34, 1, 0, 0, 0, 116, 122, 5, 34, 0, 0, 117, 118, 5, 92, 0, 0, 118, 121, 9, 0, 0, 0, 119, 121, 8, 16, 0, 0, 120, 117, 1, 0, 0, 0, 120, 119, 1, 0, 0, 0, 121, 124, 1, 0, 0, 0, 122, 120, 1, 0, 0, 0, 122, 123, 1, 0, 0, 0, 123, 125, 1, 0, 0, 0, 124, 122, 1, 0, 0, 0, 125, 126, 5, 34, 0, 0, 126, 36, 1, 0, 0, 0, 127, 133, 5, 39, 0, 0, 128, 129, 5, 92, 0, 0, 129, 132, 9, 0, 0, 0, 130, 132, 8, 17, 0, 0, 131, 128, 1, 0, 0, 0, 131, 130, 1, 0, 0, 0, 132, 135, 1, 0, 0, 0, 133, 131, 1, 0, 0, 0, 133, 134, 1, 0, 0, 0, 134, 136, 1, 0, 0, 0, 135, 133, 1, 0, 0, 0, 136, 137, 5, 39, 0, 0, 137, 38, 1, 0, 0, 0, 138, 140, 8, 18, 0, 0, 139, 138, 1, 0, 0, 0, 140, 141, 1, 0, 0, 0, 141, 139, 1, 0, 0, 0, 141, 142, 1, 0, 0, 0, 142, 40, 1, 0, 0, 0, 143, 147, 3, 39, 19, 0, 144, 147, 3, 35, 17, 0, 145, 147, 3, 37, 18, 0, 146, 143, 1, 0, 0, 0, 146, 144, 1, 0, 0, 0, 146, 145, 1, 0, 0, 0, 147, 42, 1, 0, 0, 0, 11, 0, 46, 52, 55, 114, 120, 122, 131, 133, 141, 146, 1, 0, 1, 0]
30 changes: 30 additions & 0 deletions src/autocomplete/databases/redis/generated/RedisLexer.tokens
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
SPACE=1
NEWLINE=2
SET=3
GET=4
INCR=5
DECR=6
NX=7
XX=8
EX=9
PX=10
EXAT=11
PXAT=12
KEEPTTL=13
SINGLE_QUOTE=14
DOUBLE_QUOTE=15
DECIMAL_LITERAL=16
IDENTIFIER=17
'SET'=3
'GET'=4
'INCR'=5
'DECR'=6
'NX'=7
'XX'=8
'EX'=9
'PX'=10
'EXAT'=11
'PXAT'=12
'KEEPTTL'=13
'\''=14
'"'=15
155 changes: 155 additions & 0 deletions src/autocomplete/databases/redis/generated/RedisLexer.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
////////////////////////////////////////////////////////
// THIS FILE IS AUTOGENERATED, DON'T EDIT IT MANUALLY //
////////////////////////////////////////////////////////

// We don't really want to check types in generated code
// @ts-nocheck



// Generated from src/autocomplete/databases/redis/grammar/RedisLexer.g4 by ANTLR 4.13.1

import * as antlr from "antlr4ng";
import { Token } from "antlr4ng";


export class RedisLexer extends antlr.Lexer {
public static readonly SPACE = 1;
public static readonly NEWLINE = 2;
public static readonly SET = 3;
public static readonly GET = 4;
public static readonly INCR = 5;
public static readonly DECR = 6;
public static readonly NX = 7;
public static readonly XX = 8;
public static readonly EX = 9;
public static readonly PX = 10;
public static readonly EXAT = 11;
public static readonly PXAT = 12;
public static readonly KEEPTTL = 13;
public static readonly SINGLE_QUOTE = 14;
public static readonly DOUBLE_QUOTE = 15;
public static readonly DECIMAL_LITERAL = 16;
public static readonly IDENTIFIER = 17;

public static readonly channelNames = [
"DEFAULT_TOKEN_CHANNEL", "HIDDEN"
];

public static readonly literalNames = [
null, null, null, "'SET'", "'GET'", "'INCR'", "'DECR'", "'NX'",
"'XX'", "'EX'", "'PX'", "'EXAT'", "'PXAT'", "'KEEPTTL'", "'''",
"'\"'"
];

public static readonly symbolicNames = [
null, "SPACE", "NEWLINE", "SET", "GET", "INCR", "DECR", "NX", "XX",
"EX", "PX", "EXAT", "PXAT", "KEEPTTL", "SINGLE_QUOTE", "DOUBLE_QUOTE",
"DECIMAL_LITERAL", "IDENTIFIER"
];

public static readonly modeNames = [
"DEFAULT_MODE",
];

public static readonly ruleNames = [
"SPACE", "NEWLINE", "SET", "GET", "INCR", "DECR", "NX", "XX", "EX",
"PX", "EXAT", "PXAT", "KEEPTTL", "SINGLE_QUOTE", "DOUBLE_QUOTE",
"DECIMAL_DIGIT", "DECIMAL_LITERAL", "DOUBLE_QUOTE_STRING", "SINGLE_QUOTE_STRING",
"BASE_IDENTIFIER", "IDENTIFIER",
];


public constructor(input: antlr.CharStream) {
super(input);
this.interpreter = new antlr.LexerATNSimulator(this, RedisLexer._ATN, RedisLexer.decisionsToDFA, new antlr.PredictionContextCache());
}

public get grammarFileName(): string { return "RedisLexer.g4"; }

public get literalNames(): (string | null)[] { return RedisLexer.literalNames; }
public get symbolicNames(): (string | null)[] { return RedisLexer.symbolicNames; }
public get ruleNames(): string[] { return RedisLexer.ruleNames; }

public get serializedATN(): number[] { return RedisLexer._serializedATN; }

public get channelNames(): string[] { return RedisLexer.channelNames; }

public get modeNames(): string[] { return RedisLexer.modeNames; }

public static readonly _serializedATN: number[] = [
4,0,17,148,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,
2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,
13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,
19,2,20,7,20,1,0,4,0,45,8,0,11,0,12,0,46,1,0,1,0,1,1,1,1,3,1,53,
8,1,1,1,3,1,56,8,1,1,2,1,2,1,2,1,2,1,3,1,3,1,3,1,3,1,4,1,4,1,4,1,
4,1,4,1,5,1,5,1,5,1,5,1,5,1,6,1,6,1,6,1,7,1,7,1,7,1,8,1,8,1,8,1,
9,1,9,1,9,1,10,1,10,1,10,1,10,1,10,1,11,1,11,1,11,1,11,1,11,1,12,
1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,13,1,13,1,14,1,14,1,15,1,15,
1,16,4,16,113,8,16,11,16,12,16,114,1,17,1,17,1,17,1,17,5,17,121,
8,17,10,17,12,17,124,9,17,1,17,1,17,1,18,1,18,1,18,1,18,5,18,132,
8,18,10,18,12,18,135,9,18,1,18,1,18,1,19,4,19,140,8,19,11,19,12,
19,141,1,20,1,20,1,20,3,20,147,8,20,0,0,21,1,1,3,2,5,3,7,4,9,5,11,
6,13,7,15,8,17,9,19,10,21,11,23,12,25,13,27,14,29,15,31,0,33,16,
35,0,37,0,39,0,41,17,1,0,19,2,0,9,9,32,32,2,0,83,83,115,115,2,0,
69,69,101,101,2,0,84,84,116,116,2,0,71,71,103,103,2,0,73,73,105,
105,2,0,78,78,110,110,2,0,67,67,99,99,2,0,82,82,114,114,2,0,68,68,
100,100,2,0,88,88,120,120,2,0,80,80,112,112,2,0,65,65,97,97,2,0,
75,75,107,107,2,0,76,76,108,108,1,0,48,57,4,0,10,10,13,13,34,34,
92,92,4,0,10,10,13,13,39,39,92,92,5,0,9,10,13,13,32,32,34,34,39,
39,154,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,
0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,
0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,
0,0,33,1,0,0,0,0,41,1,0,0,0,1,44,1,0,0,0,3,55,1,0,0,0,5,57,1,0,0,
0,7,61,1,0,0,0,9,65,1,0,0,0,11,70,1,0,0,0,13,75,1,0,0,0,15,78,1,
0,0,0,17,81,1,0,0,0,19,84,1,0,0,0,21,87,1,0,0,0,23,92,1,0,0,0,25,
97,1,0,0,0,27,105,1,0,0,0,29,107,1,0,0,0,31,109,1,0,0,0,33,112,1,
0,0,0,35,116,1,0,0,0,37,127,1,0,0,0,39,139,1,0,0,0,41,146,1,0,0,
0,43,45,7,0,0,0,44,43,1,0,0,0,45,46,1,0,0,0,46,44,1,0,0,0,46,47,
1,0,0,0,47,48,1,0,0,0,48,49,6,0,0,0,49,2,1,0,0,0,50,52,5,13,0,0,
51,53,5,10,0,0,52,51,1,0,0,0,52,53,1,0,0,0,53,56,1,0,0,0,54,56,5,
10,0,0,55,50,1,0,0,0,55,54,1,0,0,0,56,4,1,0,0,0,57,58,7,1,0,0,58,
59,7,2,0,0,59,60,7,3,0,0,60,6,1,0,0,0,61,62,7,4,0,0,62,63,7,2,0,
0,63,64,7,3,0,0,64,8,1,0,0,0,65,66,7,5,0,0,66,67,7,6,0,0,67,68,7,
7,0,0,68,69,7,8,0,0,69,10,1,0,0,0,70,71,7,9,0,0,71,72,7,2,0,0,72,
73,7,7,0,0,73,74,7,8,0,0,74,12,1,0,0,0,75,76,7,6,0,0,76,77,7,10,
0,0,77,14,1,0,0,0,78,79,7,10,0,0,79,80,7,10,0,0,80,16,1,0,0,0,81,
82,7,2,0,0,82,83,7,10,0,0,83,18,1,0,0,0,84,85,7,11,0,0,85,86,7,10,
0,0,86,20,1,0,0,0,87,88,7,2,0,0,88,89,7,10,0,0,89,90,7,12,0,0,90,
91,7,3,0,0,91,22,1,0,0,0,92,93,7,11,0,0,93,94,7,10,0,0,94,95,7,12,
0,0,95,96,7,3,0,0,96,24,1,0,0,0,97,98,7,13,0,0,98,99,7,2,0,0,99,
100,7,2,0,0,100,101,7,11,0,0,101,102,7,3,0,0,102,103,7,3,0,0,103,
104,7,14,0,0,104,26,1,0,0,0,105,106,5,39,0,0,106,28,1,0,0,0,107,
108,5,34,0,0,108,30,1,0,0,0,109,110,7,15,0,0,110,32,1,0,0,0,111,
113,3,31,15,0,112,111,1,0,0,0,113,114,1,0,0,0,114,112,1,0,0,0,114,
115,1,0,0,0,115,34,1,0,0,0,116,122,5,34,0,0,117,118,5,92,0,0,118,
121,9,0,0,0,119,121,8,16,0,0,120,117,1,0,0,0,120,119,1,0,0,0,121,
124,1,0,0,0,122,120,1,0,0,0,122,123,1,0,0,0,123,125,1,0,0,0,124,
122,1,0,0,0,125,126,5,34,0,0,126,36,1,0,0,0,127,133,5,39,0,0,128,
129,5,92,0,0,129,132,9,0,0,0,130,132,8,17,0,0,131,128,1,0,0,0,131,
130,1,0,0,0,132,135,1,0,0,0,133,131,1,0,0,0,133,134,1,0,0,0,134,
136,1,0,0,0,135,133,1,0,0,0,136,137,5,39,0,0,137,38,1,0,0,0,138,
140,8,18,0,0,139,138,1,0,0,0,140,141,1,0,0,0,141,139,1,0,0,0,141,
142,1,0,0,0,142,40,1,0,0,0,143,147,3,39,19,0,144,147,3,35,17,0,145,
147,3,37,18,0,146,143,1,0,0,0,146,144,1,0,0,0,146,145,1,0,0,0,147,
42,1,0,0,0,11,0,46,52,55,114,120,122,131,133,141,146,1,0,1,0
];

private static __ATN: antlr.ATN;
public static get _ATN(): antlr.ATN {
if (!RedisLexer.__ATN) {
RedisLexer.__ATN = new antlr.ATNDeserializer().deserialize(RedisLexer._serializedATN);
}

return RedisLexer.__ATN;
}


private static readonly vocabulary = new antlr.Vocabulary(RedisLexer.literalNames, RedisLexer.symbolicNames, []);

public override get vocabulary(): antlr.Vocabulary {
return RedisLexer.vocabulary;
}

private static readonly decisionsToDFA = RedisLexer._ATN.decisionToState.map( (ds: antlr.DecisionState, index: number) => new antlr.DFA(ds, index) );
}
Loading
Loading