from dataclasses import dataclass


@dataclass(frozen=True)
class Token:
    type: str
    literal: str


# Token types
ILLEGAL = "ILLEGAL"
EOF = "EOF"
PLUS = "PLUS"
SUBTRACT = "SUBTRACT"
ASTERISK = "ASTERISK"
SLASH = "SLASH"
PIPE = "PIPE"
PIPEPIPE = "PIPEPIPE"
EQUAL = "EQUAL"
BANG = "BANG"
BANGEQUAL = "BANGEQUAL"
LT = "LT"
LTGT = "LTGT"
LTEQUAL = "LTEQUAL"
GT = "GT"
GTEQUAL = "GTEQUAL"
COMMA = "COMMA"
FULLSTOP = "FULLSTOP"
COLON = "COLON"
COLONCOLON = "COLONCOLON"
LPAREN = "LPAREN"
RPAREN = "RPAREN"

WHITESPACE = "WHITESPACE"
COMMENT_SINGLE = "COMMENT_SINGLE"
COMMENT_MULTI = "COMMENT_MULTI"

IDENTIFIER = "IDENTIFIER"
INTEGER = "INTEGER"
ASSIGNMENT = "ASSIGNMENT"
STRING = "STRING"

BY = "BY"

# Functions
COUNT = "COUNT"
SUM = "SUM"
AVG = "AVG"

# Keywords from https://docs.aws.amazon.com/redshift/latest/dg/r_pg_keywords.html
AES128 = "AES128"
AES256 = "AES256"
ALL = "ALL"
ALLOWOVERWRITE = "ALLOWOVERWRITE"
ANALYSE = "ANALYSE"
ANALYZE = "ANALYZE"
AND = "AND"
ANY = "ANY"
ARRAY = "ARRAY"
AS = "AS"
ASC = "ASC"
AUTHORIZATION = "AUTHORIZATION"
AZ64 = "AZ64"
BACKUP = "BACKUP"
BETWEEN = "BETWEEN"
BINARY = "BINARY"
BLANKSASNULL = "BLANKSASNULL"
BOTH = "BOTH"
BYTEDICT = "BYTEDICT"
BZIP2 = "BZIP2"
CASE = "CASE"
CAST = "CAST"
CHECK = "CHECK"
COLLATE = "COLLATE"
COLUMN = "COLUMN"
CONSTRAINT = "CONSTRAINT"
CREATE = "CREATE"
CREDENTIALS = "CREDENTIALS"
CROSS = "CROSS"
CURRENT_DATE = "CURRENT_DATE"
CURRENT_TIME = "CURRENT_TIME"
CURRENT_TIMESTAMP = "CURRENT_TIMESTAMP"
CURRENT_USER = "CURRENT_USER"
CURRENT_USER_ID = "CURRENT_USER_ID"
DEFAULT = "DEFAULT"
DEFERRABLE = "DEFERRABLE"
DEFLATE = "DEFLATE"
DEFRAG = "DEFRAG"
DELTA = "DELTA"
DELTA32K = "DELTA32K"
DESC = "DESC"
DISABLE = "DISABLE"
DISTINCT = "DISTINCT"
DO = "DO"
ELSE = "ELSE"
EMPTYASNULL = "EMPTYASNULL"
ENABLE = "ENABLE"
ENCODE = "ENCODE"
ENCRYPT = "ENCRYPT"
ENCRYPTION = "ENCRYPTION"
END = "END"
EXCEPT = "EXCEPT"
EXPLICIT = "EXPLICIT"
FALSE = "FALSE"
FOR = "FOR"
FOREIGN = "FOREIGN"
FREEZE = "FREEZE"
FROM = "FROM"
FULL = "FULL"
GLOBALDICT256 = "GLOBALDICT256"
GLOBALDICT64K = "GLOBALDICT64K"
GRANT = "GRANT"
GROUP = "GROUP"
GZIP = "GZIP"
HAVING = "HAVING"
IDENTITY = "IDENTITY"
IGNORE = "IGNORE"
ILIKE = "ILIKE"
IN = "IN"
INITIALLY = "INITIALLY"
INNER = "INNER"
INTERSECT = "INTERSECT"
INTO = "INTO"
IS = "IS"
ISNULL = "ISNULL"
JOIN = "JOIN"
LANGUAGE = "LANGUAGE"
LEADING = "LEADING"
LEFT = "LEFT"
LIKE = "LIKE"
LIMIT = "LIMIT"
LOCALTIME = "LOCALTIME"
LOCALTIMESTAMP = "LOCALTIMESTAMP"
LUN = "LUN"
LUNS = "LUNS"
LZO = "LZO"
LZOP = "LZOP"
MINUS = "MINUS"
MOSTLY13 = "MOSTLY13"
MOSTLY32 = "MOSTLY32"
MOSTLY8 = "MOSTLY8"
NATURAL = "NATURAL"
NEW = "NEW"
NOT = "NOT"
NOTNULL = "NOTNULL"
NULL = "NULL"
NULLS = "NULLS"
OFF = "OFF"
OFFLINE = "OFFLINE"
OFFSET = "OFFSET"
OID = "OID"
OLD = "OLD"
ON = "ON"
ONLY = "ONLY"
OPEN = "OPEN"
OR = "OR"
ORDER = "ORDER"
OUTER = "OUTER"
OVERLAPS = "OVERLAPS"
PARALLEL = "PARALLEL"
PARTITION = "PARTITION"
PERCENT = "PERCENT"
PERMISSIONS = "PERMISSIONS"
PLACING = "PLACING"
PRIMARY = "PRIMARY"
RAW = "RAW"
READRATIO = "READRATIO"
RECOVER = "RECOVER"
REFERENCES = "REFERENCES"
RESPECT = "RESPECT"
REJECTLOG = "REJECTLOG"
RESORT = "RESORT"
RESTORE = "RESTORE"
RIGHT = "RIGHT"
SELECT = "SELECT"
SESSION_USER = "SESSION_USER"
SIMILAR = "SIMILAR"
SNAPSHOT = "SNAPSHOT"
SOME = "SOME"
SYSDATE = "SYSDATE"
SYSTEM = "SYSTEM"
TABLE = "TABLE"
TAG = "TAG"
TDES = "TDES"
TEXT255 = "TEXT255"
TEXT32K = "TEXT32K"
THEN = "THEN"
TIMESTAMP = "TIMESTAMP"
TO = "TO"
TOP = "TOP"
TRAILING = "TRAILING"
TRUE = "TRUE"
TRUNCATECOLUMNS = "TRUNCATECOLUMNS"
UNION = "UNION"
UNIQUE = "UNIQUE"
USER = "USER"
USING = "USING"
VERBOSE = "VERBOSE"
WALLET = "WALLET"
WHEN = "WHEN"
WHERE = "WHERE"
WITH = "WITH"
WITHOUT = "WITHOUT"
