mirror of
https://github.com/neilotoole/sq.git
synced 2024-12-19 14:11:45 +03:00
f07edef14d
* Support for --src.schema in commands "slq", "sql", and "inspect"
142 lines
10 KiB
Plaintext
142 lines
10 KiB
Plaintext
token literal names:
|
|
null
|
|
';'
|
|
'*'
|
|
'sum'
|
|
'avg'
|
|
'max'
|
|
'min'
|
|
'schema'
|
|
'catalog'
|
|
'unique'
|
|
'uniq'
|
|
'count'
|
|
'.['
|
|
'||'
|
|
'/'
|
|
'%'
|
|
'<<'
|
|
'>>'
|
|
'&'
|
|
'&&'
|
|
'~'
|
|
'!'
|
|
null
|
|
null
|
|
null
|
|
'group_by'
|
|
'+'
|
|
'-'
|
|
null
|
|
null
|
|
null
|
|
'null'
|
|
null
|
|
null
|
|
'('
|
|
')'
|
|
'['
|
|
']'
|
|
','
|
|
'|'
|
|
':'
|
|
null
|
|
null
|
|
'<='
|
|
'<'
|
|
'>='
|
|
'>'
|
|
'!='
|
|
'=='
|
|
null
|
|
null
|
|
null
|
|
null
|
|
|
|
token symbolic names:
|
|
null
|
|
null
|
|
null
|
|
null
|
|
null
|
|
null
|
|
null
|
|
null
|
|
null
|
|
null
|
|
null
|
|
null
|
|
null
|
|
null
|
|
null
|
|
null
|
|
null
|
|
null
|
|
null
|
|
null
|
|
null
|
|
null
|
|
PROPRIETARY_FUNC_NAME
|
|
JOIN_TYPE
|
|
WHERE
|
|
GROUP_BY
|
|
ORDER_ASC
|
|
ORDER_DESC
|
|
ORDER_BY
|
|
ALIAS_RESERVED
|
|
ARG
|
|
NULL
|
|
ID
|
|
WS
|
|
LPAR
|
|
RPAR
|
|
LBRA
|
|
RBRA
|
|
COMMA
|
|
PIPE
|
|
COLON
|
|
NN
|
|
NUMBER
|
|
LT_EQ
|
|
LT
|
|
GT_EQ
|
|
GT
|
|
NEQ
|
|
EQ
|
|
NAME
|
|
HANDLE
|
|
STRING
|
|
LINECOMMENT
|
|
|
|
rule names:
|
|
stmtList
|
|
query
|
|
segment
|
|
element
|
|
funcElement
|
|
func
|
|
funcName
|
|
join
|
|
joinTable
|
|
uniqueFunc
|
|
countFunc
|
|
where
|
|
groupByTerm
|
|
groupBy
|
|
orderByTerm
|
|
orderBy
|
|
selector
|
|
selectorElement
|
|
alias
|
|
arg
|
|
handleTable
|
|
handle
|
|
rowRange
|
|
exprElement
|
|
expr
|
|
literal
|
|
unaryOperator
|
|
|
|
|
|
atn:
|
|
[4, 1, 52, 283, 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, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 1, 0, 5, 0, 56, 8, 0, 10, 0, 12, 0, 59, 9, 0, 1, 0, 1, 0, 4, 0, 63, 8, 0, 11, 0, 12, 0, 64, 1, 0, 5, 0, 68, 8, 0, 10, 0, 12, 0, 71, 9, 0, 1, 0, 5, 0, 74, 8, 0, 10, 0, 12, 0, 77, 9, 0, 1, 1, 1, 1, 1, 1, 5, 1, 82, 8, 1, 10, 1, 12, 1, 85, 9, 1, 1, 2, 1, 2, 1, 2, 5, 2, 90, 8, 2, 10, 2, 12, 2, 93, 9, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 107, 8, 3, 1, 4, 1, 4, 3, 4, 111, 8, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 5, 5, 118, 8, 5, 10, 5, 12, 5, 121, 9, 5, 1, 5, 3, 5, 124, 8, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 3, 7, 135, 8, 7, 1, 7, 1, 7, 1, 8, 3, 8, 140, 8, 8, 1, 8, 1, 8, 3, 8, 144, 8, 8, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 3, 10, 151, 8, 10, 1, 10, 3, 10, 154, 8, 10, 1, 10, 3, 10, 157, 8, 10, 1, 11, 1, 11, 1, 11, 3, 11, 162, 8, 11, 1, 11, 1, 11, 1, 12, 1, 12, 3, 12, 168, 8, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 5, 13, 175, 8, 13, 10, 13, 12, 13, 178, 9, 13, 1, 13, 1, 13, 1, 14, 1, 14, 3, 14, 184, 8, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 5, 15, 191, 8, 15, 10, 15, 12, 15, 194, 9, 15, 1, 15, 1, 15, 1, 16, 1, 16, 3, 16, 200, 8, 16, 1, 17, 1, 17, 3, 17, 204, 8, 17, 1, 18, 1, 18, 1, 18, 3, 18, 209, 8, 18, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 3, 22, 227, 8, 22, 1, 22, 1, 22, 1, 23, 1, 23, 3, 23, 233, 8, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 3, 24, 247, 8, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 3, 24, 268, 8, 24, 1, 24, 1, 24, 1, 24, 1, 24, 5, 24, 274, 8, 24, 10, 24, 12, 24, 277, 9, 24, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 0, 1, 48, 27, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 0, 9, 2, 0, 3, 8, 22, 22, 1, 0, 9, 10, 1, 0, 26, 27, 3, 0, 30, 30, 32, 32, 51, 51, 2, 0, 2, 2, 14, 15, 1, 0, 16, 18, 1, 0, 43, 46, 3, 0, 31, 31, 41, 42, 51, 51, 2, 0, 20, 21, 26, 27, 309, 0, 57, 1, 0, 0, 0, 2, 78, 1, 0, 0, 0, 4, 86, 1, 0, 0, 0, 6, 106, 1, 0, 0, 0, 8, 108, 1, 0, 0, 0, 10, 112, 1, 0, 0, 0, 12, 127, 1, 0, 0, 0, 14, 129, 1, 0, 0, 0, 16, 139, 1, 0, 0, 0, 18, 145, 1, 0, 0, 0, 20, 147, 1, 0, 0, 0, 22, 158, 1, 0, 0, 0, 24, 167, 1, 0, 0, 0, 26, 169, 1, 0, 0, 0, 28, 181, 1, 0, 0, 0, 30, 185, 1, 0, 0, 0, 32, 197, 1, 0, 0, 0, 34, 201, 1, 0, 0, 0, 36, 208, 1, 0, 0, 0, 38, 210, 1, 0, 0, 0, 40, 212, 1, 0, 0, 0, 42, 215, 1, 0, 0, 0, 44, 217, 1, 0, 0, 0, 46, 230, 1, 0, 0, 0, 48, 246, 1, 0, 0, 0, 50, 278, 1, 0, 0, 0, 52, 280, 1, 0, 0, 0, 54, 56, 5, 1, 0, 0, 55, 54, 1, 0, 0, 0, 56, 59, 1, 0, 0, 0, 57, 55, 1, 0, 0, 0, 57, 58, 1, 0, 0, 0, 58, 60, 1, 0, 0, 0, 59, 57, 1, 0, 0, 0, 60, 69, 3, 2, 1, 0, 61, 63, 5, 1, 0, 0, 62, 61, 1, 0, 0, 0, 63, 64, 1, 0, 0, 0, 64, 62, 1, 0, 0, 0, 64, 65, 1, 0, 0, 0, 65, 66, 1, 0, 0, 0, 66, 68, 3, 2, 1, 0, 67, 62, 1, 0, 0, 0, 68, 71, 1, 0, 0, 0, 69, 67, 1, 0, 0, 0, 69, 70, 1, 0, 0, 0, 70, 75, 1, 0, 0, 0, 71, 69, 1, 0, 0, 0, 72, 74, 5, 1, 0, 0, 73, 72, 1, 0, 0, 0, 74, 77, 1, 0, 0, 0, 75, 73, 1, 0, 0, 0, 75, 76, 1, 0, 0, 0, 76, 1, 1, 0, 0, 0, 77, 75, 1, 0, 0, 0, 78, 83, 3, 4, 2, 0, 79, 80, 5, 39, 0, 0, 80, 82, 3, 4, 2, 0, 81, 79, 1, 0, 0, 0, 82, 85, 1, 0, 0, 0, 83, 81, 1, 0, 0, 0, 83, 84, 1, 0, 0, 0, 84, 3, 1, 0, 0, 0, 85, 83, 1, 0, 0, 0, 86, 91, 3, 6, 3, 0, 87, 88, 5, 38, 0, 0, 88, 90, 3, 6, 3, 0, 89, 87, 1, 0, 0, 0, 90, 93, 1, 0, 0, 0, 91, 89, 1, 0, 0, 0, 91, 92, 1, 0, 0, 0, 92, 5, 1, 0, 0, 0, 93, 91, 1, 0, 0, 0, 94, 107, 3, 40, 20, 0, 95, 107, 3, 42, 21, 0, 96, 107, 3, 34, 17, 0, 97, 107, 3, 14, 7, 0, 98, 107, 3, 26, 13, 0, 99, 107, 3, 30, 15, 0, 100, 107, 3, 44, 22, 0, 101, 107, 3, 18, 9, 0, 102, 107, 3, 20, 10, 0, 103, 107, 3, 22, 11, 0, 104, 107, 3, 8, 4, 0, 105, 107, 3, 46, 23, 0, 106, 94, 1, 0, 0, 0, 106, 95, 1, 0, 0, 0, 106, 96, 1, 0, 0, 0, 106, 97, 1, 0, 0, 0, 106, 98, 1, 0, 0, 0, 106, 99, 1, 0, 0, 0, 106, 100, 1, 0, 0, 0, 106, 101, 1, 0, 0, 0, 106, 102, 1, 0, 0, 0, 106, 103, 1, 0, 0, 0, 106, 104, 1, 0, 0, 0, 106, 105, 1, 0, 0, 0, 107, 7, 1, 0, 0, 0, 108, 110, 3, 10, 5, 0, 109, 111, 3, 36, 18, 0, 110, 109, 1, 0, 0, 0, 110, 111, 1, 0, 0, 0, 111, 9, 1, 0, 0, 0, 112, 113, 3, 12, 6, 0, 113, 123, 5, 34, 0, 0, 114, 119, 3, 48, 24, 0, 115, 116, 5, 38, 0, 0, 116, 118, 3, 48, 24, 0, 117, 115, 1, 0, 0, 0, 118, 121, 1, 0, 0, 0, 119, 117, 1, 0, 0, 0, 119, 120, 1, 0, 0, 0, 120, 124, 1, 0, 0, 0, 121, 119, 1, 0, 0, 0, 122, 124, 5, 2, 0, 0, 123, 114, 1, 0, 0, 0, 123, 122, 1, 0, 0, 0, 123, 124, 1, 0, 0, 0, 124, 125, 1, 0, 0, 0, 125, 126, 5, 35, 0, 0, 126, 11, 1, 0, 0, 0, 127, 128, 7, 0, 0, 0, 128, 13, 1, 0, 0, 0, 129, 130, 5, 23, 0, 0, 130, 131, 5, 34, 0, 0, 131, 134, 3, 16, 8, 0, 132, 133, 5, 38, 0, 0, 133, 135, 3, 48, 24, 0, 134, 132, 1, 0, 0, 0, 134, 135, 1, 0, 0, 0, 135, 136, 1, 0, 0, 0, 136, 137, 5, 35, 0, 0, 137, 15, 1, 0, 0, 0, 138, 140, 5, 50, 0, 0, 139, 138, 1, 0, 0, 0, 139, 140, 1, 0, 0, 0, 140, 141, 1, 0, 0, 0, 141, 143, 5, 49, 0, 0, 142, 144, 3, 36, 18, 0, 143, 142, 1, 0, 0, 0, 143, 144, 1, 0, 0, 0, 144, 17, 1, 0, 0, 0, 145, 146, 7, 1, 0, 0, 146, 19, 1, 0, 0, 0, 147, 153, 5, 11, 0, 0, 148, 150, 5, 34, 0, 0, 149, 151, 3, 32, 16, 0, 150, 149, 1, 0, 0, 0, 150, 151, 1, 0, 0, 0, 151, 152, 1, 0, 0, 0, 152, 154, 5, 35, 0, 0, 153, 148, 1, 0, 0, 0, 153, 154, 1, 0, 0, 0, 154, 156, 1, 0, 0, 0, 155, 157, 3, 36, 18, 0, 156, 155, 1, 0, 0, 0, 156, 157, 1, 0, 0, 0, 157, 21, 1, 0, 0, 0, 158, 159, 5, 24, 0, 0, 159, 161, 5, 34, 0, 0, 160, 162, 3, 48, 24, 0, 161, 160, 1, 0, 0, 0, 161, 162, 1, 0, 0, 0, 162, 163, 1, 0, 0, 0, 163, 164, 5, 35, 0, 0, 164, 23, 1, 0, 0, 0, 165, 168, 3, 32, 16, 0, 166, 168, 3, 10, 5, 0, 167, 165, 1, 0, 0, 0, 167, 166, 1, 0, 0, 0, 168, 25, 1, 0, 0, 0, 169, 170, 5, 25, 0, 0, 170, 171, 5, 34, 0, 0, 171, 176, 3, 24, 12, 0, 172, 173, 5, 38, 0, 0, 173, 175, 3, 24, 12, 0, 174, 172, 1, 0, 0, 0, 175, 178, 1, 0, 0, 0, 176, 174, 1, 0, 0, 0, 176, 177, 1, 0, 0, 0, 177, 179, 1, 0, 0, 0, 178, 176, 1, 0, 0, 0, 179, 180, 5, 35, 0, 0, 180, 27, 1, 0, 0, 0, 181, 183, 3, 32, 16, 0, 182, 184, 7, 2, 0, 0, 183, 182, 1, 0, 0, 0, 183, 184, 1, 0, 0, 0, 184, 29, 1, 0, 0, 0, 185, 186, 5, 28, 0, 0, 186, 187, 5, 34, 0, 0, 187, 192, 3, 28, 14, 0, 188, 189, 5, 38, 0, 0, 189, 191, 3, 28, 14, 0, 190, 188, 1, 0, 0, 0, 191, 194, 1, 0, 0, 0, 192, 190, 1, 0, 0, 0, 192, 193, 1, 0, 0, 0, 193, 195, 1, 0, 0, 0, 194, 192, 1, 0, 0, 0, 195, 196, 5, 35, 0, 0, 196, 31, 1, 0, 0, 0, 197, 199, 5, 49, 0, 0, 198, 200, 5, 49, 0, 0, 199, 198, 1, 0, 0, 0, 199, 200, 1, 0, 0, 0, 200, 33, 1, 0, 0, 0, 201, 203, 3, 32, 16, 0, 202, 204, 3, 36, 18, 0, 203, 202, 1, 0, 0, 0, 203, 204, 1, 0, 0, 0, 204, 35, 1, 0, 0, 0, 205, 209, 5, 29, 0, 0, 206, 207, 5, 40, 0, 0, 207, 209, 7, 3, 0, 0, 208, 205, 1, 0, 0, 0, 208, 206, 1, 0, 0, 0, 209, 37, 1, 0, 0, 0, 210, 211, 5, 30, 0, 0, 211, 39, 1, 0, 0, 0, 212, 213, 5, 50, 0, 0, 213, 214, 5, 49, 0, 0, 214, 41, 1, 0, 0, 0, 215, 216, 5, 50, 0, 0, 216, 43, 1, 0, 0, 0, 217, 226, 5, 12, 0, 0, 218, 219, 5, 41, 0, 0, 219, 220, 5, 40, 0, 0, 220, 227, 5, 41, 0, 0, 221, 222, 5, 41, 0, 0, 222, 227, 5, 40, 0, 0, 223, 224, 5, 40, 0, 0, 224, 227, 5, 41, 0, 0, 225, 227, 5, 41, 0, 0, 226, 218, 1, 0, 0, 0, 226, 221, 1, 0, 0, 0, 226, 223, 1, 0, 0, 0, 226, 225, 1, 0, 0, 0, 226, 227, 1, 0, 0, 0, 227, 228, 1, 0, 0, 0, 228, 229, 5, 37, 0, 0, 229, 45, 1, 0, 0, 0, 230, 232, 3, 48, 24, 0, 231, 233, 3, 36, 18, 0, 232, 231, 1, 0, 0, 0, 232, 233, 1, 0, 0, 0, 233, 47, 1, 0, 0, 0, 234, 235, 6, 24, -1, 0, 235, 236, 5, 34, 0, 0, 236, 237, 3, 48, 24, 0, 237, 238, 5, 35, 0, 0, 238, 247, 1, 0, 0, 0, 239, 247, 3, 32, 16, 0, 240, 247, 3, 50, 25, 0, 241, 247, 3, 38, 19, 0, 242, 243, 3, 52, 26, 0, 243, 244, 3, 48, 24, 9, 244, 247, 1, 0, 0, 0, 245, 247, 3, 10, 5, 0, 246, 234, 1, 0, 0, 0, 246, 239, 1, 0, 0, 0, 246, 240, 1, 0, 0, 0, 246, 241, 1, 0, 0, 0, 246, 242, 1, 0, 0, 0, 246, 245, 1, 0, 0, 0, 247, 275, 1, 0, 0, 0, 248, 249, 10, 8, 0, 0, 249, 250, 5, 13, 0, 0, 250, 274, 3, 48, 24, 9, 251, 252, 10, 7, 0, 0, 252, 253, 7, 4, 0, 0, 253, 274, 3, 48, 24, 8, 254, 255, 10, 6, 0, 0, 255, 256, 7, 2, 0, 0, 256, 274, 3, 48, 24, 7, 257, 258, 10, 5, 0, 0, 258, 259, 7, 5, 0, 0, 259, 274, 3, 48, 24, 6, 260, 261, 10, 4, 0, 0, 261, 262, 7, 6, 0, 0, 262, 274, 3, 48, 24, 5, 263, 267, 10, 3, 0, 0, 264, 268, 5, 48, 0, 0, 265, 268, 5, 47, 0, 0, 266, 268, 1, 0, 0, 0, 267, 264, 1, 0, 0, 0, 267, 265, 1, 0, 0, 0, 267, 266, 1, 0, 0, 0, 268, 269, 1, 0, 0, 0, 269, 274, 3, 48, 24, 4, 270, 271, 10, 2, 0, 0, 271, 272, 5, 19, 0, 0, 272, 274, 3, 48, 24, 3, 273, 248, 1, 0, 0, 0, 273, 251, 1, 0, 0, 0, 273, 254, 1, 0, 0, 0, 273, 257, 1, 0, 0, 0, 273, 260, 1, 0, 0, 0, 273, 263, 1, 0, 0, 0, 273, 270, 1, 0, 0, 0, 274, 277, 1, 0, 0, 0, 275, 273, 1, 0, 0, 0, 275, 276, 1, 0, 0, 0, 276, 49, 1, 0, 0, 0, 277, 275, 1, 0, 0, 0, 278, 279, 7, 7, 0, 0, 279, 51, 1, 0, 0, 0, 280, 281, 7, 8, 0, 0, 281, 53, 1, 0, 0, 0, 30, 57, 64, 69, 75, 83, 91, 106, 110, 119, 123, 134, 139, 143, 150, 153, 156, 161, 167, 176, 183, 192, 199, 203, 208, 226, 232, 246, 267, 273, 275] |