UNPKG

dt-sql-parser

Version:

SQL Parsers for BigData, built with antlr4

619 lines (618 loc) 23.9 kB
import * as antlr from "antlr4ng"; export declare class PostgreSqlLexer extends antlr.Lexer { static readonly Dollar = 1; static readonly OPEN_PAREN = 2; static readonly CLOSE_PAREN = 3; static readonly OPEN_BRACKET = 4; static readonly CLOSE_BRACKET = 5; static readonly COMMA = 6; static readonly SEMI = 7; static readonly COLON = 8; static readonly STAR = 9; static readonly EQUAL = 10; static readonly DOT = 11; static readonly PLUS = 12; static readonly MINUS = 13; static readonly SLASH = 14; static readonly CARET = 15; static readonly LT = 16; static readonly GT = 17; static readonly LESS_LESS = 18; static readonly GREATER_GREATER = 19; static readonly COLON_EQUALS = 20; static readonly LESS_EQUALS = 21; static readonly EQUALS_GREATER = 22; static readonly GREATER_EQUALS = 23; static readonly DOT_DOT = 24; static readonly NOT_EQUALS = 25; static readonly TYPECAST = 26; static readonly PERCENT = 27; static readonly PARAM = 28; static readonly Operator = 29; static readonly KW_ALL = 30; static readonly KW_ANALYSE = 31; static readonly KW_ANALYZE = 32; static readonly KW_AND = 33; static readonly KW_ANY = 34; static readonly KW_ARRAY = 35; static readonly KW_AS = 36; static readonly KW_ASC = 37; static readonly KW_ASYMMETRIC = 38; static readonly KW_BOTH = 39; static readonly KW_CASE = 40; static readonly KW_CAST = 41; static readonly KW_CHECK = 42; static readonly KW_COLLATE = 43; static readonly KW_COLUMN = 44; static readonly KW_CONSTRAINT = 45; static readonly KW_CREATE = 46; static readonly KW_CURRENT_CATALOG = 47; static readonly KW_CURRENT_DATE = 48; static readonly KW_CURRENT_ROLE = 49; static readonly KW_CURRENT_TIME = 50; static readonly KW_CURRENT_TIMESTAMP = 51; static readonly KW_CURRENT_USER = 52; static readonly KW_DEFAULT = 53; static readonly KW_DEFERRABLE = 54; static readonly KW_DESC = 55; static readonly KW_DISTINCT = 56; static readonly KW_DO = 57; static readonly KW_ELSE = 58; static readonly KW_EXCEPT = 59; static readonly KW_FALSE = 60; static readonly KW_FETCH = 61; static readonly KW_FOR = 62; static readonly KW_FOREIGN = 63; static readonly KW_FROM = 64; static readonly KW_GRANT = 65; static readonly KW_GROUP = 66; static readonly KW_HAVING = 67; static readonly KW_IN = 68; static readonly KW_INITIALLY = 69; static readonly KW_INTERSECT = 70; static readonly KW_INTO = 71; static readonly KW_LATERAL = 72; static readonly KW_LEADING = 73; static readonly KW_LIMIT = 74; static readonly KW_LOCALTIME = 75; static readonly KW_LOCALTIMESTAMP = 76; static readonly KW_NOT = 77; static readonly KW_NULL = 78; static readonly KW_OFFSET = 79; static readonly KW_ON = 80; static readonly KW_ONLY = 81; static readonly KW_OR = 82; static readonly KW_ORDER = 83; static readonly KW_PLACING = 84; static readonly KW_PRIMARY = 85; static readonly KW_REFERENCES = 86; static readonly KW_RETURNING = 87; static readonly KW_SELECT = 88; static readonly KW_SESSION_USER = 89; static readonly KW_SOME = 90; static readonly KW_SYMMETRIC = 91; static readonly KW_TABLE = 92; static readonly KW_THEN = 93; static readonly KW_TO = 94; static readonly KW_TRAILING = 95; static readonly KW_TRUE = 96; static readonly KW_UNION = 97; static readonly KW_UNIQUE = 98; static readonly KW_USER = 99; static readonly KW_USING = 100; static readonly KW_VARIADIC = 101; static readonly KW_WHEN = 102; static readonly KW_WHERE = 103; static readonly KW_WINDOW = 104; static readonly KW_WITH = 105; static readonly KW_AUTHORIZATION = 106; static readonly KW_BINARY = 107; static readonly KW_COLLATION = 108; static readonly KW_CONCURRENTLY = 109; static readonly KW_CROSS = 110; static readonly KW_CURRENT_SCHEMA = 111; static readonly KW_FREEZE = 112; static readonly KW_FULL = 113; static readonly KW_ILIKE = 114; static readonly KW_INNER = 115; static readonly KW_IS = 116; static readonly KW_ISNULL = 117; static readonly KW_JOIN = 118; static readonly KW_LEFT = 119; static readonly KW_LIKE = 120; static readonly KW_NATURAL = 121; static readonly KW_NOTNULL = 122; static readonly KW_OUTER = 123; static readonly KW_OVER = 124; static readonly KW_OVERLAPS = 125; static readonly KW_RIGHT = 126; static readonly KW_SIMILAR = 127; static readonly KW_VERBOSE = 128; static readonly KW_ABORT = 129; static readonly KW_ABSOLUTE = 130; static readonly KW_ACCESS = 131; static readonly KW_ACTION = 132; static readonly KW_ADD = 133; static readonly KW_ADMIN = 134; static readonly KW_AFTER = 135; static readonly KW_AGGREGATE = 136; static readonly KW_ALSO = 137; static readonly KW_ALTER = 138; static readonly KW_ALWAYS = 139; static readonly KW_ASSERTION = 140; static readonly KW_ASSIGNMENT = 141; static readonly KW_AT = 142; static readonly KW_ATTRIBUTE = 143; static readonly KW_BACKWARD = 144; static readonly KW_BEFORE = 145; static readonly KW_BEGIN = 146; static readonly KW_BY = 147; static readonly KW_CACHE = 148; static readonly KW_CALLED = 149; static readonly KW_CASCADE = 150; static readonly KW_CASCADED = 151; static readonly KW_CATALOG = 152; static readonly KW_CHAIN = 153; static readonly KW_CHARACTERISTICS = 154; static readonly KW_CHECKPOINT = 155; static readonly KW_CLASS = 156; static readonly KW_CLOSE = 157; static readonly KW_CLUSTER = 158; static readonly KW_COMMENT = 159; static readonly KW_COMMENTS = 160; static readonly KW_COMMIT = 161; static readonly KW_COMMITTED = 162; static readonly KW_CONFIGURATION = 163; static readonly KW_CONNECTION = 164; static readonly KW_CONSTRAINTS = 165; static readonly KW_CONTENT = 166; static readonly KW_CONTINUE = 167; static readonly KW_CONVERSION = 168; static readonly KW_COPY = 169; static readonly KW_COST = 170; static readonly KW_CSV = 171; static readonly KW_CURSOR = 172; static readonly KW_CYCLE = 173; static readonly KW_DATA = 174; static readonly KW_DATABASE = 175; static readonly KW_DAY = 176; static readonly KW_DEALLOCATE = 177; static readonly KW_DECLARE = 178; static readonly KW_DEFAULTS = 179; static readonly KW_DEFERRED = 180; static readonly KW_DEFINER = 181; static readonly KW_DELETE = 182; static readonly KW_DELIMITER = 183; static readonly KW_DELIMITERS = 184; static readonly KW_DICTIONARY = 185; static readonly KW_DISABLE = 186; static readonly KW_DISCARD = 187; static readonly KW_DOCUMENT = 188; static readonly KW_DOMAIN = 189; static readonly KW_DOUBLE = 190; static readonly KW_DROP = 191; static readonly KW_EACH = 192; static readonly KW_ENABLE = 193; static readonly KW_ENCODING = 194; static readonly KW_ENCRYPTED = 195; static readonly KW_ENUM = 196; static readonly KW_ESCAPE = 197; static readonly KW_EVENT = 198; static readonly KW_EXCLUDE = 199; static readonly KW_EXCLUDING = 200; static readonly KW_EXCLUSIVE = 201; static readonly KW_EXECUTE = 202; static readonly KW_EXPLAIN = 203; static readonly KW_EXTENSION = 204; static readonly KW_EXTERNAL = 205; static readonly KW_FAMILY = 206; static readonly KW_FIRST = 207; static readonly KW_FOLLOWING = 208; static readonly KW_FORCE = 209; static readonly KW_FORWARD = 210; static readonly KW_FUNCTION = 211; static readonly KW_FUNCTIONS = 212; static readonly KW_GLOBAL = 213; static readonly KW_GRANTED = 214; static readonly KW_HANDLER = 215; static readonly KW_HEADER = 216; static readonly KW_HOLD = 217; static readonly KW_HOUR = 218; static readonly KW_IDENTITY = 219; static readonly KW_IF = 220; static readonly KW_IMMEDIATE = 221; static readonly KW_IMMUTABLE = 222; static readonly KW_IMPLICIT = 223; static readonly KW_INCLUDING = 224; static readonly KW_INCREMENT = 225; static readonly KW_INDEX = 226; static readonly KW_INDEXES = 227; static readonly KW_INHERIT = 228; static readonly KW_NOINHERIT = 229; static readonly KW_SUPERUSER = 230; static readonly KW_NOSUPERUSER = 231; static readonly KW_CREATEDB = 232; static readonly KW_NOCREATEDB = 233; static readonly KW_CREATEROLE = 234; static readonly KW_NOCREATEROLE = 235; static readonly KW_CREATEUSER = 236; static readonly KW_NOCREATEUSER = 237; static readonly KW_INHERITS = 238; static readonly KW_INLINE = 239; static readonly KW_INSENSITIVE = 240; static readonly KW_INSERT = 241; static readonly KW_INSTEAD = 242; static readonly KW_INVOKER = 243; static readonly KW_ISOLATION = 244; static readonly KW_KEY = 245; static readonly KW_LABEL = 246; static readonly KW_LANGUAGE = 247; static readonly KW_LARGE = 248; static readonly KW_LAST = 249; static readonly KW_LEAKPROOF = 250; static readonly KW_LEVEL = 251; static readonly KW_LISTEN = 252; static readonly KW_LOAD = 253; static readonly KW_LOCAL = 254; static readonly KW_LOCATION = 255; static readonly KW_LOCK = 256; static readonly KW_MAPPING = 257; static readonly KW_MATCH = 258; static readonly KW_MATERIALIZED = 259; static readonly KW_MAXVALUE = 260; static readonly KW_MINUTE = 261; static readonly KW_MINVALUE = 262; static readonly KW_MODE = 263; static readonly KW_MONTH = 264; static readonly KW_MOVE = 265; static readonly KW_NAME = 266; static readonly KW_NAMES = 267; static readonly KW_NEXT = 268; static readonly KW_NO = 269; static readonly KW_NOTHING = 270; static readonly KW_NOTIFY = 271; static readonly KW_NOWAIT = 272; static readonly KW_NULLS = 273; static readonly KW_OBJECT = 274; static readonly KW_OF = 275; static readonly KW_OFF = 276; static readonly KW_OIDS = 277; static readonly KW_OPERATOR = 278; static readonly KW_OPTION = 279; static readonly KW_OPTIONS = 280; static readonly KW_OWNED = 281; static readonly KW_OWNER = 282; static readonly KW_PARSER = 283; static readonly KW_PARTIAL = 284; static readonly KW_PARTITION = 285; static readonly KW_PASSING = 286; static readonly KW_PASSWORD = 287; static readonly KW_PLANS = 288; static readonly KW_PRECEDING = 289; static readonly KW_PREPARE = 290; static readonly KW_PREPARED = 291; static readonly KW_PRESERVE = 292; static readonly KW_PRIOR = 293; static readonly KW_PRIVILEGES = 294; static readonly KW_PROCEDURAL = 295; static readonly KW_PROCEDURE = 296; static readonly KW_PROGRAM = 297; static readonly KW_QUOTE = 298; static readonly KW_RANGE = 299; static readonly KW_READ = 300; static readonly KW_REASSIGN = 301; static readonly KW_RECHECK = 302; static readonly KW_RECURSIVE = 303; static readonly KW_REF = 304; static readonly KW_REFRESH = 305; static readonly KW_REINDEX = 306; static readonly KW_RELATIVE = 307; static readonly KW_RELEASE = 308; static readonly KW_RENAME = 309; static readonly KW_REPEATABLE = 310; static readonly KW_REPLACE = 311; static readonly KW_REPLICA = 312; static readonly KW_RESET = 313; static readonly KW_RESTART = 314; static readonly KW_RESTRICT = 315; static readonly KW_RETURNS = 316; static readonly KW_REVOKE = 317; static readonly KW_ROLE = 318; static readonly KW_ROLLBACK = 319; static readonly KW_ROWS = 320; static readonly KW_RULE = 321; static readonly KW_SAVEPOINT = 322; static readonly KW_SCHEMA = 323; static readonly KW_SCROLL = 324; static readonly KW_SEARCH = 325; static readonly KW_SECOND = 326; static readonly KW_SECURITY = 327; static readonly KW_SEQUENCE = 328; static readonly KW_SEQUENCES = 329; static readonly KW_SERIALIZABLE = 330; static readonly KW_SERVER = 331; static readonly KW_SESSION = 332; static readonly KW_SET = 333; static readonly KW_SHARE = 334; static readonly KW_SHOW = 335; static readonly KW_SIMPLE = 336; static readonly KW_SNAPSHOT = 337; static readonly KW_STABLE = 338; static readonly KW_STANDALONE = 339; static readonly KW_START = 340; static readonly KW_STATEMENT = 341; static readonly KW_STATISTICS = 342; static readonly KW_STDIN = 343; static readonly KW_STDOUT = 344; static readonly KW_STORAGE = 345; static readonly KW_STRICT = 346; static readonly KW_STRIP = 347; static readonly KW_SYSID = 348; static readonly KW_SYSTEM = 349; static readonly KW_TABLES = 350; static readonly KW_TABLESPACE = 351; static readonly KW_TEMP = 352; static readonly KW_TEMPLATE = 353; static readonly KW_TEMPORARY = 354; static readonly KW_TEXT = 355; static readonly KW_TRANSACTION = 356; static readonly KW_TRIGGER = 357; static readonly KW_TRUNCATE = 358; static readonly KW_TRUSTED = 359; static readonly KW_TYPE = 360; static readonly KW_TYPES = 361; static readonly KW_UNBOUNDED = 362; static readonly KW_UNCOMMITTED = 363; static readonly KW_UNENCRYPTED = 364; static readonly KW_UNKNOWN = 365; static readonly KW_UNLISTEN = 366; static readonly KW_UNLOGGED = 367; static readonly KW_UNTIL = 368; static readonly KW_UPDATE = 369; static readonly KW_VACUUM = 370; static readonly KW_VALID = 371; static readonly KW_VALIDATE = 372; static readonly KW_VALIDATOR = 373; static readonly KW_VARYING = 374; static readonly KW_VERSION = 375; static readonly KW_VIEW = 376; static readonly KW_VOLATILE = 377; static readonly KW_WHITESPACE = 378; static readonly KW_WITHOUT = 379; static readonly KW_WORK = 380; static readonly KW_WRAPPER = 381; static readonly KW_WRITE = 382; static readonly KW_XML = 383; static readonly KW_YEAR = 384; static readonly KW_YES = 385; static readonly KW_ZONE = 386; static readonly KW_BETWEEN = 387; static readonly KW_BIGINT = 388; static readonly KW_BIT = 389; static readonly KW_BOOLEAN = 390; static readonly KW_CHAR = 391; static readonly KW_CHARACTER = 392; static readonly KW_COALESCE = 393; static readonly KW_DEC = 394; static readonly KW_DECIMAL = 395; static readonly KW_EXISTS = 396; static readonly KW_EXTRACT = 397; static readonly KW_FLOAT = 398; static readonly KW_GREATEST = 399; static readonly KW_INOUT = 400; static readonly KW_INT = 401; static readonly KW_INTEGER = 402; static readonly KW_INTERVAL = 403; static readonly KW_LEAST = 404; static readonly KW_NATIONAL = 405; static readonly KW_NCHAR = 406; static readonly KW_NONE = 407; static readonly KW_NULLIF = 408; static readonly KW_NUMERIC = 409; static readonly KW_OVERLAY = 410; static readonly KW_POSITION = 411; static readonly KW_PRECISION = 412; static readonly KW_REAL = 413; static readonly KW_ROW = 414; static readonly KW_SETOF = 415; static readonly KW_SMALLINT = 416; static readonly KW_SUBSTRING = 417; static readonly KW_TIME = 418; static readonly KW_TIMESTAMP = 419; static readonly KW_TREAT = 420; static readonly KW_TRIM = 421; static readonly KW_VALUES = 422; static readonly KW_VARCHAR = 423; static readonly KW_XMLATTRIBUTES = 424; static readonly KW_XMLCONCAT = 425; static readonly KW_XMLELEMENT = 426; static readonly KW_XMLEXISTS = 427; static readonly KW_XMLFOREST = 428; static readonly KW_XMLPARSE = 429; static readonly KW_XMLPI = 430; static readonly KW_XMLROOT = 431; static readonly KW_XMLSERIALIZE = 432; static readonly KW_CALL = 433; static readonly KW_CURRENT = 434; static readonly KW_ATTACH = 435; static readonly KW_DETACH = 436; static readonly KW_EXPRESSION = 437; static readonly KW_GENERATED = 438; static readonly KW_LOGGED = 439; static readonly KW_STORED = 440; static readonly KW_INCLUDE = 441; static readonly KW_ROUTINE = 442; static readonly KW_TRANSFORM = 443; static readonly KW_IMPORT = 444; static readonly KW_POLICY = 445; static readonly KW_METHOD = 446; static readonly KW_REFERENCING = 447; static readonly KW_NEW = 448; static readonly KW_OLD = 449; static readonly KW_VALUE = 450; static readonly KW_SUBSCRIPTION = 451; static readonly KW_PUBLICATION = 452; static readonly KW_OUT = 453; static readonly KW_END = 454; static readonly KW_ROUTINES = 455; static readonly KW_SCHEMAS = 456; static readonly KW_PROCEDURES = 457; static readonly KW_INPUT = 458; static readonly KW_SUPPORT = 459; static readonly KW_PARALLEL = 460; static readonly KW_SQL = 461; static readonly KW_DEPENDS = 462; static readonly KW_OVERRIDING = 463; static readonly KW_CONFLICT = 464; static readonly KW_SKIP = 465; static readonly KW_LOCKED = 466; static readonly KW_TIES = 467; static readonly KW_ROLLUP = 468; static readonly KW_CUBE = 469; static readonly KW_GROUPING = 470; static readonly KW_SETS = 471; static readonly KW_TABLESAMPLE = 472; static readonly KW_ORDINALITY = 473; static readonly KW_XMLTABLE = 474; static readonly KW_COLUMNS = 475; static readonly KW_XMLNAMESPACES = 476; static readonly KW_ROWTYPE = 477; static readonly KW_NORMALIZED = 478; static readonly KW_WITHIN = 479; static readonly KW_FILTER = 480; static readonly KW_GROUPS = 481; static readonly KW_OTHERS = 482; static readonly KW_NFC = 483; static readonly KW_NFD = 484; static readonly KW_NFKC = 485; static readonly KW_NFKD = 486; static readonly KW_UESCAPE = 487; static readonly KW_VIEWS = 488; static readonly KW_NORMALIZE = 489; static readonly KW_DUMP = 490; static readonly KW_PRINT_STRICT_PARAMS = 491; static readonly KW_VARIABLE_CONFLICT = 492; static readonly KW_ERROR = 493; static readonly KW_USE_VARIABLE = 494; static readonly KW_USE_COLUMN = 495; static readonly KW_ALIAS = 496; static readonly KW_CONSTANT = 497; static readonly KW_PERFORM = 498; static readonly KW_GET = 499; static readonly KW_DIAGNOSTICS = 500; static readonly KW_STACKED = 501; static readonly KW_ELSIF = 502; static readonly KW_WHILE = 503; static readonly KW_REVERSE = 504; static readonly KW_FOREACH = 505; static readonly KW_SLICE = 506; static readonly KW_EXIT = 507; static readonly KW_RETURN = 508; static readonly KW_QUERY = 509; static readonly KW_RAISE = 510; static readonly KW_SQLSTATE = 511; static readonly KW_DEBUG = 512; static readonly KW_LOG = 513; static readonly KW_INFO = 514; static readonly KW_NOTICE = 515; static readonly KW_WARNING = 516; static readonly KW_EXCEPTION = 517; static readonly KW_ASSERT = 518; static readonly KW_LOOP = 519; static readonly KW_OPEN = 520; static readonly KW_PEFERENCES = 521; static readonly KW_USAGE = 522; static readonly KW_CONNECT = 523; static readonly KW_PUBLIC = 524; static readonly KW_MERGE = 525; static readonly KW_MATCHED = 526; static readonly KW_BREADTH = 527; static readonly KW_DEPTH = 528; static readonly KW_UNSAFE = 529; static readonly KW_RESTRICTED = 530; static readonly KW_SAFE = 531; static readonly KW_FINALIZE = 532; static readonly KW_MODULUS = 533; static readonly KW_REMAINDER = 534; static readonly KW_LOGIN = 535; static readonly KW_NOLOGIN = 536; static readonly KW_REPLICATION = 537; static readonly KW_NOREPLICATION = 538; static readonly KW_BYPASSRLS = 539; static readonly KW_NOBYPASSRLS = 540; static readonly KW_PERMISSIVE = 541; static readonly KW_RESTRICTIVE = 542; static readonly KW_COMPRESSION = 543; static readonly KW_PLAIN = 544; static readonly KW_EXTENDED = 545; static readonly KW_MAIN = 546; static readonly KW_SKIP_LOCKED = 547; static readonly KW_BUFFER_USAGE_LIMIT = 548; static readonly KW_FORCE_QUOTE = 549; static readonly KW_FORCE_NOT_NULL = 550; static readonly KW_FORCE_NULL = 551; static readonly Identifier = 552; static readonly QuotedIdentifier = 553; static readonly UnterminatedQuotedIdentifier = 554; static readonly InvalidQuotedIdentifier = 555; static readonly InvalidUnterminatedQuotedIdentifier = 556; static readonly UnicodeQuotedIdentifier = 557; static readonly UnterminatedUnicodeQuotedIdentifier = 558; static readonly InvalidUnicodeQuotedIdentifier = 559; static readonly InvalidUnterminatedUnicodeQuotedIdentifier = 560; static readonly StringConstant = 561; static readonly UnterminatedStringConstant = 562; static readonly UnicodeEscapeStringConstant = 563; static readonly UnterminatedUnicodeEscapeStringConstant = 564; static readonly BeginDollarStringConstant = 565; static readonly BinaryStringConstant = 566; static readonly UnterminatedBinaryStringConstant = 567; static readonly InvalidBinaryStringConstant = 568; static readonly InvalidUnterminatedBinaryStringConstant = 569; static readonly HexadecimalStringConstant = 570; static readonly UnterminatedHexadecimalStringConstant = 571; static readonly InvalidHexadecimalStringConstant = 572; static readonly InvalidUnterminatedHexadecimalStringConstant = 573; static readonly Integral = 574; static readonly NumericFail = 575; static readonly Numeric = 576; static readonly PLSQLVARIABLENAME = 577; static readonly PLSQLIDENTIFIER = 578; static readonly WHITE_SPACE = 579; static readonly LINE_COMMENT = 580; static readonly BRACKETED_COMMENT = 581; static readonly UnterminatedBlockComment = 582; static readonly MetaCommand = 583; static readonly EndMetaCommand = 584; static readonly ErrorCharacter = 585; static readonly EscapeStringConstant = 586; static readonly UnterminatedEscapeStringConstant = 587; static readonly InvalidEscapeStringConstant = 588; static readonly InvalidUnterminatedEscapeStringConstant = 589; static readonly DollarText = 590; static readonly EndDollarStringConstant = 591; static readonly AfterEscapeStringConstantWithNewlineMode_Continued = 592; static readonly EscapeStringConstantMode = 1; static readonly AfterEscapeStringConstantMode = 2; static readonly AfterEscapeStringConstantWithNewlineMode = 3; static readonly DollarQuotedStringMode = 4; static readonly channelNames: string[]; static readonly literalNames: (string | null)[]; static readonly symbolicNames: (string | null)[]; static readonly modeNames: string[]; static readonly ruleNames: string[]; constructor(input: antlr.CharStream); get grammarFileName(): string; get literalNames(): (string | null)[]; get symbolicNames(): (string | null)[]; get ruleNames(): string[]; get serializedATN(): number[]; get channelNames(): string[]; get modeNames(): string[]; static readonly _serializedATN: number[]; private static __ATN; static get _ATN(): antlr.ATN; private static readonly vocabulary; get vocabulary(): antlr.Vocabulary; private static readonly decisionsToDFA; }